namespace Khaemhat.Core.Entities;
///
/// An entity with the audit columns of SPEC ยง5.2 (created_at, created_by, updated_at,
/// updated_by) and the row_version used for optimistic concurrency. The data layer fills them; code above
/// it only reads them.
///
public interface IAuditable
{
/// When the row was inserted, in UTC.
DateTime CreatedAt { get; set; }
/// Who inserted the row (user name, or a system actor such as system), when known.
string? CreatedBy { get; set; }
/// When the row was last updated, in UTC; if it never was.
DateTime? UpdatedAt { get; set; }
/// Who last updated the row, when known.
string? UpdatedBy { get; set; }
///
/// Incremented by every update. An update succeeds only if the stored value still equals this one; otherwise the
/// data layer throws .
///
long RowVersion { get; set; }
}