using Abp.AutoMapper; using System.ComponentModel.DataAnnotations; using VberZero.AppService.Base.Dto; using VberZero.BaseSystem.Roles; namespace VberZero.AppService.Roles.Dto; [AutoMapTo(typeof(Role))] public class CreateRoleDto { [StringLength(Role.MaxNameLength)] public string Name { get; set; } [Required] [StringLength(Role.MaxDisplayNameLength)] public string DisplayName { get; set; } public string NormalizedName { get; set; } [StringLength(Role.MaxDescriptionLength)] public string Description { get; set; } public List PermissionNames { get; set; } public CreateRoleDto() { PermissionNames = new List(); } /// /// 用户级别 /// public virtual VzDefinition.UserType UserType { get; set; } /// /// 账户类型 /// public VzDefinition.AccountType AccountType { get; set; } } [AutoMapTo(typeof(Role))] public class UpdateRoleDto : VzEntityDto { //[Required] //[StringLength(Role.MaxNameLength)] //public string Name { get; set; } [Required] [StringLength(Role.MaxDisplayNameLength)] public string DisplayName { get; set; } public string NormalizedName { get; set; } [StringLength(Role.MaxDescriptionLength)] public string Description { get; set; } /// /// 用户级别 /// public virtual VzDefinition.UserType UserType { get; set; } public List PermissionNames { get; set; } }