mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-30 12:47:57 +08:00
47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
![]() |
using SqlSugar;
|
|||
|
using System;
|
|||
|
|
|||
|
namespace WWB.Park.Entity
|
|||
|
{
|
|||
|
|
|||
|
public interface IDeletedFilter
|
|||
|
{
|
|||
|
bool IsDelete { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public interface IAgentFilter
|
|||
|
{
|
|||
|
long AgentId { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public interface IMemberFilter
|
|||
|
{
|
|||
|
long MemberId { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public abstract class EntityBase<TPrimary>
|
|||
|
{
|
|||
|
[SugarColumn(ColumnName = "id")] public TPrimary Id { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public abstract class AuditDeleteEntityBase<TPrimary> : AuditEntityBase<TPrimary>, IDeletedFilter
|
|||
|
{
|
|||
|
[SugarColumn(ColumnName = "is_delete", ColumnDescription = "软删除")]
|
|||
|
public bool IsDelete { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public abstract class AuditEntityBase<TPrimary> : EntityBase<TPrimary>
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
[SugarColumn(ColumnName = "add_time", IsOnlyIgnoreUpdate = true)]
|
|||
|
public DateTime AddTime { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
[SugarColumn(ColumnName = "update_time", IsNullable = true, IsOnlyIgnoreInsert = true)]
|
|||
|
public DateTime UpdateTime { get; set; }
|
|||
|
}
|
|||
|
}
|