using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace BaseOUDAL { public class Role : IDataTrace { /// /// 岗位Json /// public string Position { get; set; } public int Id { get; set; } [Required] [MaxLength(50)] [DisplayName("名称")] public string Name { get; set; } [MaxLength(50)] [DisplayName("备注")] public string Remark { get; set; } [DisplayName("操作时间")] public DateTime? OptDate { get; set; } public Role() { Remark = ""; } public string GetDataTraceKeyInfo() { return "角色:" + Name; } } [NotMapped] public class RoleDto : Role { /// /// /// public int RoleUserCount { get; set; } } public class RolePosition { public string Name { get; set; } } }