using SqlSugar; using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace Magic.Core.Entity; /// /// 角色表 /// [SugarTable("sys_role")] [Description("角色表")] public class SysRole : DBEntityTenant { /// /// 名称 /// [Required, MaxLength(20)] [SugarColumn(ColumnDescription = "名称")] public string Name { get; set; } /// /// 编码 /// [Required, MaxLength(50)] [SugarColumn(ColumnDescription = "编码")] public string Code { get; set; } /// /// 排序 /// [SugarColumn(ColumnDescription = "排序")] public int Sort { get; set; } /// /// 数据范围类型(字典 1全部数据 2本部门及以下数据 3本部门数据 4仅本人数据 5自定义数据) /// [SugarColumn(ColumnDescription = "数据范围类型(字典 1全部数据 2本部门及以下数据 3本部门数据 4仅本人数据 5自定义数据)")] public DataScopeType DataScopeType { get; set; } /// /// 备注 /// [MaxLength(100)] [SugarColumn(ColumnDescription = "备注", IsNullable = true)] public string Remark { get; set; } /// /// 状态(字典 0正常 1停用 2删除) /// [SugarColumn(ColumnDescription = "状态(字典 0正常 1停用 2删除)")] public CommonStatus Status { get; set; } = CommonStatus.ENABLE; /// /// 管理员类型-超级管理员_1、非管理员_2 /// [SugarColumn(ColumnDescription = " 管理员类型-超级管理员_1、非管理员_2", IsNullable = true)] public RoleType? RoleType { get; set; } }