版本260406

This commit is contained in:
2026-04-06 22:04:05 +08:00
parent 7dc5e73af7
commit 0b150470be
216 changed files with 98993 additions and 33 deletions

View File

@@ -0,0 +1,52 @@
namespace OrpaonVision.Core.Domain;
/// <summary>
/// 可审计实体基类。
/// </summary>
public abstract class AuditableEntityBase : EntityBase
{
/// <summary>
/// 创建时间UTC
/// </summary>
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
/// <summary>
/// 创建者。
/// </summary>
public string? CreatedBy { get; set; }
/// <summary>
/// 更新时间UTC
/// </summary>
public DateTime? UpdatedAt { get; set; }
/// <summary>
/// 更新者。
/// </summary>
public string? UpdatedBy { get; set; }
/// <summary>
/// 备注。
/// </summary>
public string? Remark { get; set; }
/// <summary>
/// 标记为已更新。
/// </summary>
/// <param name="updatedBy">更新者。</param>
public virtual void MarkAsUpdated(string? updatedBy = null)
{
UpdatedAt = DateTime.UtcNow;
UpdatedBy = updatedBy;
}
/// <summary>
/// 标记为已创建。
/// </summary>
/// <param name="createdBy">创建者。</param>
public virtual void MarkAsCreated(string? createdBy = null)
{
CreatedAt = DateTime.UtcNow;
CreatedBy = createdBy;
}
}