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