using System.ComponentModel.DataAnnotations;
namespace AmtScanner.Api.Models;
///
/// 系统角色
///
public class Role
{
[Key]
public int Id { get; set; }
///
/// 角色名称
///
[Required]
[MaxLength(100)]
public string RoleName { get; set; } = string.Empty;
///
/// 角色编码(如 R_SUPER, R_ADMIN, R_USER)
///
[Required]
[MaxLength(50)]
public string RoleCode { get; set; } = string.Empty;
///
/// 角色描述
///
[MaxLength(500)]
public string? Description { get; set; }
///
/// 是否启用
///
public bool Enabled { get; set; } = true;
///
/// 创建时间
///
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
///
/// 用户角色关联
///
public ICollection UserRoles { get; set; } = new List();
///
/// 角色菜单关联
///
public ICollection RoleMenus { get; set; } = new List();
}