You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.2 KiB
C#

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