64 lines
1.8 KiB
C#
64 lines
1.8 KiB
C#
|
|
using SqlSugar;
|
|||
|
|
using Yitter.IdGenerator;
|
|||
|
|
|
|||
|
|
namespace QYZH.InteractiveMagazine.Models.Entity
|
|||
|
|
{
|
|||
|
|
public class SqlSugarBaseEntity
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Desc:主键
|
|||
|
|
/// Default:
|
|||
|
|
/// Nullable:False
|
|||
|
|
/// </summary>
|
|||
|
|
public long Id { get; set; } = YitIdHelper.NextId();
|
|||
|
|
/// <summary>
|
|||
|
|
/// Desc:状态 0禁用 1启用
|
|||
|
|
/// Default:1
|
|||
|
|
/// Nullable:False
|
|||
|
|
/// </summary>
|
|||
|
|
[SugarColumn(ColumnName = "Status")]
|
|||
|
|
public string Status { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Desc:是否删除
|
|||
|
|
/// Default:b'0'
|
|||
|
|
/// Nullable:False
|
|||
|
|
/// </summary>
|
|||
|
|
[SugarColumn(ColumnName = "IsDeleted")]
|
|||
|
|
public bool IsDeleted { get; set; } = false;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Desc:创建人
|
|||
|
|
/// Default:
|
|||
|
|
/// Nullable:False
|
|||
|
|
/// </summary>
|
|||
|
|
[SugarColumn(ColumnName = "CreatedBy", IsOnlyIgnoreUpdate = true)]
|
|||
|
|
public string CreatedBy { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Desc:创建时间
|
|||
|
|
/// Default:
|
|||
|
|
/// Nullable:False
|
|||
|
|
/// </summary>
|
|||
|
|
[SugarColumn(ColumnName = "CreatedAt", IsOnlyIgnoreUpdate = true)]
|
|||
|
|
public DateTime CreatedAt { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Desc:修改人
|
|||
|
|
/// Default:
|
|||
|
|
/// Nullable:True
|
|||
|
|
/// </summary>
|
|||
|
|
[SugarColumn(ColumnName = "updatedBy", IsOnlyIgnoreInsert = true)]
|
|||
|
|
public string UpdatedBy { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Desc:修改时间
|
|||
|
|
/// Default:
|
|||
|
|
/// Nullable:True
|
|||
|
|
/// </summary>
|
|||
|
|
[SugarColumn(ColumnName = "UpdatedAt", IsOnlyIgnoreInsert = true)]
|
|||
|
|
public DateTime? UpdatedAt { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|