namespace Baya.Domain.Common;

/// <summary>
/// Marks an entity whose row-level changes are written to the append-only <c>audit_logs</c> trail by the
/// SaveChanges audit interceptor. This is distinct from <see cref="IAuditableEntity"/> (which only stamps
/// the create/modify audit <em>fields</em>): implementing <c>IAuditable</c> additionally produces an
/// immutable audit-log row per insert/update/delete. Reserve it for compliance-sensitive entities —
/// <c>platform_configs</c> is auditable so finance can prove the exact rate in effect at any moment.
/// </summary>
public interface IAuditable : IEntity
{
}

/// <summary>
/// Applied to a property of an <see cref="IAuditable"/> entity whose value must never appear in the
/// audit diff (<c>changed_fields_json</c>). The interceptor writes a redaction marker instead of the
/// plaintext — used for encrypted/PII columns.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public sealed class AuditRedactedAttribute : Attribute
{
}
