This commit is contained in:
2026-11-15 17:53:12 +03:30
parent fd78ac884c
commit f24cfb2fc1
13 changed files with 1296 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
using xModels.Base;
using System.ComponentModel.DataAnnotations;
namespace xIdentityModels.Models
{
/// <summary>
/// a Role Definition Model (mirror of ASP.NET IdentityRole + Weight) ...
/// </summary>
public class XRoleDefinition : XBaseIntIDEntity
{
/// <summary>
/// Unique Normalized Role Name, e.g. chief_clerk ...
/// </summary>
[Required]
[StringLength(256)]
public string Name { get; set; }
/// <summary>
/// Persian Display Name, e.g. سر دبیر ...
/// </summary>
[StringLength(255)]
public string DisplayName { get; set; }
/// <summary>
/// Role Weight, same as XUserRole enum (user=0 ... admin=10) ...
/// </summary>
public int Weight { get; set; }
/// <summary>
/// Optional Parent Role for Inheritance ...
/// </summary>
[StringLength(256)]
public string ParentRoleName { get; set; }
/// <summary>
/// Is Enabled ...
/// </summary>
public bool IsEnabled { get; set; } = true;
/// <summary>
/// Seeded from Constants, cannot be removed ...
/// </summary>
public bool IsSystem { get; set; }
}
}