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