12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- namespace Model
- {
- /// <summary>
- /// 系统角色表 sys_role
- /// </summary>
- [SugarTable("sys_role", "系统角色表")]
- [Tenant("0")]
- public class SysRole
- {
- /// <summary>
- /// 角色ID
- /// </summary>
- [SugarColumn(ColumnDescription = "角色ID", IsPrimaryKey = true, IsIdentity = true, ColumnName = "role_id")]
- public long roleId { get; set; }
- /// <summary>
- /// 角色名称
- /// </summary>
- [SugarColumn(ColumnDescription = "角色名称", Length = 64, ColumnName = "role_name")]
- public string? roleName { get; set; }
- /// <summary>
- /// 角色编码
- /// </summary>
- [SugarColumn(ColumnDescription = "角色编码", Length = 64, ColumnName = "role_code")]
- public string? roleCode { get; set; }
- /// <summary>
- /// 角色描述
- /// </summary>
- [SugarColumn(ColumnDescription = "角色描述", Length = 255, ColumnName = "role_desc")]
- public string? roleDesc { get; set; }
- /// <summary>
- /// 创建人
- /// </summary>
- [SugarColumn(ColumnDescription = "创建人", Length = 64, ColumnName = "create_by")]
- public string? CreateBy { get; set; }
- /// <summary>
- /// 修改人
- /// </summary>
- [SugarColumn(ColumnDescription = "修改人", Length = 64, ColumnName = "update_by")]
- public string? UpdateBy { get; set; }
- /// <summary>
- /// 创建时间
- /// </summary>
- [SugarColumn(ColumnDescription = "创建时间", ColumnName = "create_time")]
- public DateTime? CreateTime { get; set; }
- /// <summary>
- /// 更新时间
- /// </summary>
- [SugarColumn(ColumnDescription = "更新时间", ColumnName = "update_time")]
- public DateTime? UpdateTime { get; set; }
- /// <summary>
- /// 删除标记,0未删除,1已删除
- /// </summary>
- [SugarColumn(ColumnDescription = "删除标记,0未删除,1已删除", Length = 1, ColumnName = "del_flag")]
- public string? DelFlag { get; set; }
- /// <summary>
- /// 用户个数
- /// </summary>
- [SugarColumn(IsIgnore = true)]
- public int userNum { get; set; }
- public SysRole() { }
- public SysRole(long roleId)
- {
- roleId = roleId;
- }
- public bool IsAdmin()
- {
- return IsAdmin(roleId);
- }
- public static bool IsAdmin(long roleId)
- {
- return 1 == roleId;
- }
- }
- }
|