<#@ template language="C#" #> <#@ assembly name="System.Core" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> using System; using Abp.AutoMapper; using Abp.Application.Services.Dto; using System.ComponentModel.DataAnnotations; namespace <#=Model.ApplicationNamespace#>.Dto { <# if(!string.IsNullOrEmpty(Model.HtmlPageTitle)){ #> /// /// <#=Model.HtmlPageTitle#> /// <# } #> [AutoMapTo(typeof(<#=Model.ClassName#>))] public class <#=Model.ClassName#>UpdateDto: EntityDto<<#=Model.IdType#>> { <# foreach (var item in Model.Columns) { if(!item.IsGenreated) continue; if(!string.IsNullOrEmpty(item.Comment)){ #> /// /// <#=item.Comment#> /// <# } if (item.IsRequired) { #> [Required] <# } var maxLength=""; if (item.IsVarchar && !string.IsNullOrEmpty(item.MaxLength)) { maxLength=item.MaxLength.StartsWith(".")?Model.ClassName+item.MaxLength:item.MaxLength; } if(!string.IsNullOrEmpty(maxLength)) { #> [StringLength(<#=maxLength#>)] <# } #> public <#=item.AttrType#> <#=item.ColumnName#> { get; set; } <# } #> } }