|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
|
|
namespace Ds.Modules.DsEntity.Base
|
|
|
|
|
{
|
|
|
|
|
public abstract class BaseComEntity
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 备注
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("备注")]
|
|
|
|
|
[SugarColumn(ColumnDataType = "300")]
|
|
|
|
|
public string DsNote { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建时间
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("创建时间")]
|
|
|
|
|
[SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间", InsertServerTime = true)]
|
|
|
|
|
public DateTime DsAddTime { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建人
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("创建人")]
|
|
|
|
|
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true, ColumnDescription = "创建人")]
|
|
|
|
|
public string DsAddUserInfo { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 修改人
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("修改人")]
|
|
|
|
|
[SqlSugar.SugarColumn(IsNullable = true, ColumnDescription = "修改人")]
|
|
|
|
|
public string DsUpdateUserInfo { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新时间
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("更新时间")]
|
|
|
|
|
[SqlSugar.SugarColumn(ColumnDescription = "更新时间", UpdateServerTime = true)]
|
|
|
|
|
public DateTime DsUpdateTime { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("删除")]
|
|
|
|
|
[SqlSugar.SugarColumn(ColumnDescription = "是否删除")]
|
|
|
|
|
public bool DsIsDel { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除时间
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("删除时间")]
|
|
|
|
|
[SqlSugar.SugarColumn(ColumnDescription = "删除时间")]
|
|
|
|
|
public DateTime DsDeleteTime { get; set; } = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除人
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("删除人")]
|
|
|
|
|
[SqlSugar.SugarColumn(IsNullable = true, ColumnDescription = "删除人")]
|
|
|
|
|
public string DsDeleteUserInfo { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 排序
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int DsSort { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 实体类基类无租户
|
|
|
|
|
/// </summary>
|
|
|
|
|
public abstract class BasEntity<TKey> : BaseComEntity
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 主键ID
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("主键ID")]
|
|
|
|
|
[SugarColumn(IsPrimaryKey = true, Length = 100, ColumnDescription = "主键ID")]
|
|
|
|
|
public TKey Id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 实体基类雪花无租户
|
|
|
|
|
/// </summary>
|
|
|
|
|
public abstract class BasEntityNoTenant : BaseComEntity
|
|
|
|
|
{
|
|
|
|
|
[SugarColumn(IsPrimaryKey = true)]
|
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 租户雪花ID实体基类
|
|
|
|
|
/// </summary>
|
|
|
|
|
public abstract class BaseEntityTenant : BaseComEntity
|
|
|
|
|
{
|
|
|
|
|
[SugarColumn(IsPrimaryKey = true)]
|
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 租户编号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string TenantNumber { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 租户实体基类key类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="Tkey"></typeparam>
|
|
|
|
|
public abstract class BaseEntityKey<Tkey> : BaseComEntity
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 主键ID
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("主键ID")]
|
|
|
|
|
[SugarColumn(IsPrimaryKey = true, Length = 100, ColumnDescription = "主键ID")]
|
|
|
|
|
public Tkey Id { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 租户编号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string TenantNumber { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 租户实体基类key类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="Tkey"></typeparam>
|
|
|
|
|
public abstract class BaseEntityNoTenantKey<Tkey> : BaseComEntity
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 主键ID
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("主键ID")]
|
|
|
|
|
[SugarColumn(IsPrimaryKey = true, Length = 100, ColumnDescription = "主键ID")]
|
|
|
|
|
public Tkey Id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 租户实体基类key类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="Tkey"></typeparam>
|
|
|
|
|
public abstract class BaseEntityGuid : BaseComEntity
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 主键ID
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Description("主键ID")]
|
|
|
|
|
[SugarColumn(IsPrimaryKey = true, Length = 100, ColumnDescription = "主键ID")]
|
|
|
|
|
public Guid Id { get; set; } = Guid.NewGuid();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 租户编号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string TenantNumber { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|