using SqlSugar; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace cylsg.Core { /// /// 最基础的模型,创建时间创建人记录 /// public class BaseModelBase { /// /// 创建时间 /// [Display(Name = "创建时间 ")] [SugarColumn(ColumnDescription = "创建时间 " , IsNullable = true)] public DateTime? CreateTime { get; set; } /// /// 创建人 /// [Display(Name = "创建人 ")] [SugarColumn(ColumnDescription = "创建人 ", ColumnDataType = "nvarchar(100)", IsNullable = true)] public string CreateBy { get; set; } /// /// 修改时间 /// [Display(Name = "修改时间 ")] [SugarColumn(ColumnDescription = "修改时间 ", IsNullable = true)] public DateTime? UpDataTime { get; set; } /// /// 修改人 /// [Display(Name = "修改人 ")] [SugarColumn(ColumnDescription = "修改人 ", ColumnDataType = "nvarchar(100)", IsNullable = true)] public string UpDataBy { get; set; } } /// /// 修正基础模型,包括了删除标志,生效标志,排序,和使能 /// public class BaseModel : BaseModelBase { /// /// 是否删除 /// [Display(Name = "是否删除 ")] [SugarColumn(ColumnDescription = "是否删除 ", DefaultValue = "0")] public bool IsDeleted { get; set; } = false; /// /// 是否有效 /// [Display(Name = "是否有效 ")] [SugarColumn(ColumnDescription = "是否有效 ", DefaultValue = "1")] public bool IsEn { get; set; } = true; /// /// 排序 /// [Display(Name = "排序 ")] [SugarColumn(ColumnDescription = "排序 ", IsNullable = true)] public int? Sort { get; set; } /// /// 标注 /// [Display(Name = "标注 ")] [SugarColumn(ColumnDescription = "标注 ", IsNullable = true)] public string Remake { get; set; } /// /// 租户 /// [Display(Name = "租户 ")] [SugarColumn(ColumnDescription = "租户 扩展 ", IsNullable = true)] public int? TenantID { get; set; } } }