| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System.ComponentModel.DataAnnotations;
- using AutoMapper.Configuration.Annotations;
- using VberZero.AppService.Base.Dto;
- using VberZero.BaseSystem.Roles;
- namespace VberZero.AppService.Roles.Dto;
- public class RoleDto : VzEntityDto<int>
- {
- public RoleDto(Role role, bool isCheck = false)
- {
- Id = role.Id;
- Name = role.Name;
- DisplayName = role.DisplayName;
- NormalizedName = role.NormalizedName;
- Description = role.Description;
- UserType = role.UserType;
- AccountType = role.AccountType;
- IsCheck = isCheck;
- }
- public RoleDto()
- {
- }
- [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 VzDefinition.UserType UserType { get; set; }
- public VzDefinition.AccountType AccountType { get; set; }
- [Ignore]
- public bool IsCheck { get; set; }
- public List<string> GrantedPermissions { get; set; }
- }
|