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.

67 lines
1.7 KiB
C#

2 years ago
using System;
using DS.Module.Core.Extensions;
using DS.Module.Core.Modules;
using Microsoft.Extensions.DependencyInjection;
namespace DS.Module.Core.Data;
/// <summary>
/// 实体类基类
/// </summary>
public abstract class BaseModel<TKey>
{
/// <summary>
/// 主键ID
/// </summary>
[SqlSugar.SugarColumn(IsPrimaryKey = true,Length = 100,ColumnDescription="主键ID")]
public TKey Id { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true,ColumnDescription="创建时间")]
public DateTime AddTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true,IsNullable = true,ColumnDescription="创建人")]
public string AddBy { get; set; }
/// <summary>
/// 修改人
/// </summary>
[SqlSugar.SugarColumn(IsNullable = true,ColumnDescription="修改人")]
public string UpdateBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription="更新时间")]
public DateTime UpdateTime { get; set; }
/// <summary>
/// 删除
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription="是否删除")]
public bool Deleted { get; set; }
/// <summary>
/// 删除时间
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription="删除时间")]
public DateTime DeleteTime { get; set; }
/// <summary>
/// 删除人
/// </summary>
[SqlSugar.SugarColumn(IsNullable = true,ColumnDescription="删除人")]
public string DeleteBy { get; set; }
}