using SqlSugar; using System; namespace New_College.Model.Models { /// /// 角色表 /// public class Role { public Role() { OrderSort = 1; CreateTime = DateTime.Now; ModifyTime = DateTime.Now; IsDeleted = false; } public Role(string name) { Name = name; Description = ""; OrderSort = 1; Enabled = true; CreateTime = DateTime.Now; ModifyTime = DateTime.Now; } /// /// ID /// [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } /// ///获取或设置是否禁用,逻辑上的删除,非物理删除 /// [SugarColumn(IsNullable = true)] public bool? IsDeleted { get; set; } /// /// 角色名 /// [SugarColumn(ColumnDataType = "nvarchar", Length = 50, IsNullable = true)] public string Name { get; set; } /// ///描述 /// [SugarColumn(ColumnDataType = "nvarchar", Length = 100, IsNullable = true)] public string Description { get; set; } /// ///排序 /// public int OrderSort { get; set; } /// /// 是否激活 /// public bool Enabled { get; set; } /// /// 创建ID /// [SugarColumn(IsNullable = true)] public int? CreateId { get; set; } /// /// 创建者 /// [SugarColumn(ColumnDataType = "nvarchar", Length = 50, IsNullable = true)] public string CreateBy { get; set; } /// /// 创建时间 /// [SugarColumn(IsNullable = true)] public DateTime? CreateTime { get; set; } = DateTime.Now; /// /// 修改ID /// [SugarColumn(IsNullable = true)] public int? ModifyId { get; set; } /// /// 修改者 /// [SugarColumn(IsNullable = true)] public string ModifyBy { get; set; } /// /// 修改时间 /// [SugarColumn(IsNullable = true)] public DateTime? ModifyTime { get; set; } = DateTime.Now; } }