Init
This commit is contained in:
25
Prefab/Domain/Common/EntityWithAudit.cs
Normal file
25
Prefab/Domain/Common/EntityWithAudit.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace Prefab.Domain.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Interface representation of an entity. All entities that require auditing should implement this.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type that will represent the entity's ID field.</typeparam>
|
||||
public interface IEntityWithAudit<T> : IEntity<T>, IAudit
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IEntityWithAudit{T}" />
|
||||
public abstract class EntityWithAudit<T> : Entity<T>, IEntityWithAudit<T>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Guid CreatedBy { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTimeOffset CreatedOn { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public Guid LastModifiedBy { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTimeOffset LastModifiedOn { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user