62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace QuestionLibraryMQConsumer.Entities
|
|
{
|
|
public class SqlSugarBaseEntity
|
|
{
|
|
/// <summary>
|
|
/// Desc:是否删除
|
|
/// Default:b'0'
|
|
/// Nullable:False
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "is_deleted")]
|
|
public bool IsDeleted { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Desc:创建人
|
|
/// Default:
|
|
/// Nullable:False
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "created_by", IsOnlyIgnoreUpdate = true)]
|
|
public long CreatedBy { get; set; }
|
|
|
|
/// <summary>
|
|
/// Desc:创建时间
|
|
/// Default:
|
|
/// Nullable:False
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "created_time", IsOnlyIgnoreUpdate = true)]
|
|
public DateTime CreatedTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// Desc:修改人
|
|
/// Default:
|
|
/// Nullable:True
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "updated_by", IsOnlyIgnoreInsert = true)]
|
|
public long UpdatedBy { get; set; }
|
|
|
|
/// <summary>
|
|
/// Desc:修改时间
|
|
/// Default:
|
|
/// Nullable:True
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "updated_time", IsOnlyIgnoreInsert = true)]
|
|
public DateTime? UpdatedTime { get; set; }
|
|
}
|
|
|
|
public class SqlSugarBaseEntity<TKey> : SqlSugarBaseEntity where TKey : struct
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
[SugarColumn(IsPrimaryKey = true, ColumnName = "id")]
|
|
public TKey Id { get; set; }
|
|
}
|
|
}
|