#nullable enable
namespace Baya.Application.Models.Configuration;

/// <summary>A runtime config row as returned to admins. <c>Value</c> is the raw string; parse per <c>DataType</c>.</summary>
public record PlatformConfigDto(
    string Key,
    string Value,
    string DataType,
    string? Description,
    // Last-changed meta for the editor row (from the entity's audit fields; falls back to creation).
    System.DateTimeOffset UpdatedAt,
    int? UpdatedBy);

/// <summary>One audited change to a config key (from the append-only audit trail).</summary>
public record ConfigChangeDto(
    long Id,
    string Action,
    string? ChangedFieldsJson,
    int? ActorUserId,
    DateTimeOffset OccurredAt);
