using System.ComponentModel; using SqlSugar; namespace DS.Module.Core.Data; /// /// 实体类基类 /// public abstract class BaseModel : IDeleted { /// /// 主键ID /// [Description("主键ID")] [SugarColumn(IsPrimaryKey = true, ColumnDescription = "主键ID")] public TKey Id { get; set; } /// /// 备注 /// [Description("备注")] [SugarColumn(IsNullable = true, ColumnDescription = "备注", Length = 200)] public string Note { get; set; } /// /// 创建时间 /// [Description("创建时间")] [SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")] public DateTime CreateTime { get; set; } /// /// 创建人 /// [Description("创建人")] [SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true, ColumnDescription = "创建人")] public long CreateBy { get; set; } /// /// 修改人 /// [Description("修改人")] [SugarColumn(IsNullable = true, ColumnDescription = "修改人")] public long UpdateBy { get; set; } /// /// 更新时间 /// [Description("更新时间")] [SugarColumn(IsNullable = true, ColumnDescription = "更新时间")] public DateTime UpdateTime { get; set; } /// /// 删除 /// [Description("删除")] [SugarColumn(ColumnDescription = "是否删除")] public bool Deleted { get; set; } = false; /// /// 删除时间 /// [Description("删除时间")] [SugarColumn(IsNullable = true, ColumnDescription = "删除时间")] public DateTime DeleteTime { get; set; } /// /// 删除人 /// [Description("删除人")] [SugarColumn(IsNullable = true, ColumnDescription = "删除人")] public long DeleteBy { get; set; } // /// // /// 租户Id // /// // [SqlSugar.SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)] // public long TenantId { get; set; } = 0; } /// /// 实体类基类 /// public abstract class BaseModelV2 : IDeleted { /// /// 主键ID /// [Description("主键ID")] [SugarColumn(IsPrimaryKey = true, ColumnDescription = "主键ID")] public TKey Id { get; set; } /// /// 备注 /// [Description("备注")] [SugarColumn(IsNullable = true, ColumnDescription = "备注", Length = 200)] public string? Note { get; set; } /// /// 创建时间 /// [Description("创建时间")] [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")] public DateTime CreateTime { get; set; } /// /// 创建人 /// [Description("创建人")] [SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true, ColumnDescription = "创建人")] public long CreateBy { get; set; } /// /// 修改人 /// [Description("修改人")] [SugarColumn(IsNullable = true, ColumnDescription = "修改人")] public long? UpdateBy { get; set; } /// /// 更新时间 /// [Description("更新时间")] [SugarColumn(IsNullable = true, ColumnDescription = "更新时间")] public DateTime? UpdateTime { get; set; } /// /// 删除 /// [Description("删除")] [SugarColumn(ColumnDescription = "是否删除")] public bool Deleted { get; set; } /// /// 删除时间 /// [Description("删除时间")] [SugarColumn(IsNullable = true, ColumnDescription = "删除时间")] public DateTime? DeleteTime { get; set; } /// /// 删除人 /// [Description("删除人")] [SugarColumn(IsNullable = true, ColumnDescription = "删除人")] public long? DeleteBy { get; set; } }