| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <#@ 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;
- using IwbZeroCore.Zero;
- namespace <#=Model.ApplicationNamespace#>.Dto
- {
- <#
- if(!string.IsNullOrEmpty(Model.HtmlPageTitle)){
- #>
- /// <summary>
- /// <#=Model.HtmlPageTitle#>
- /// </summary>
- <# }
- #> [AutoMapTo(typeof(<#=Model.ClassName#>))]
- public class <#=Model.FileName#>UpdateDto: EntityDto<<#=Model.IdType#>>
- {
- <#
- foreach (var item in Model.Columns)
- {
- if(!item.IsGenreated) continue;
- if(!string.IsNullOrEmpty(item.Comment)){
- #>
- /// <summary>
- /// <#=item.Comment#>
- /// </summary>
- <# }
- 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; }
- <#
- }
- #>
- }
- }
|