using xModels.Base; using System.ComponentModel.DataAnnotations; namespace xIdentityModels.Models { /// /// a Role Definition Model (mirror of ASP.NET IdentityRole + Weight) ... /// public class XRoleDefinition : XBaseIntIDEntity { /// /// Unique Normalized Role Name, e.g. chief_clerk ... /// [Required] [StringLength(256)] public string Name { get; set; } /// /// Persian Display Name, e.g. سر دبیر ... /// [StringLength(255)] public string DisplayName { get; set; } /// /// Role Weight, same as XUserRole enum (user=0 ... admin=10) ... /// public int Weight { get; set; } /// /// Optional Parent Role for Inheritance ... /// [StringLength(256)] public string ParentRoleName { get; set; } /// /// Is Enabled ... /// public bool IsEnabled { get; set; } = true; /// /// Seeded from Constants, cannot be removed ... /// public bool IsSystem { get; set; } } }