initial commit
This commit is contained in:
19
backend/Domain/Base/AuditableEntity.cs
Normal file
19
backend/Domain/Base/AuditableEntity.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace Extrudex.Domain.Base;
|
||||
|
||||
/// <summary>
|
||||
/// Base entity providing automatic audit timestamp tracking and a primary key.
|
||||
/// All domain entities that require created/updated timestamps should inherit from this class.
|
||||
/// Inherits Id from BaseEntity, so subclasses have both identity and audit columns.
|
||||
/// </summary>
|
||||
public abstract class AuditableEntity : BaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Timestamp indicating when this entity was first created (UTC).
|
||||
/// </summary>
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp indicating when this entity was last modified (UTC).
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
Reference in New Issue
Block a user