namespace DiunaBI.Application.DTOModels;

public class RecordHistoryDto
{
    public Guid Id { get; set; }
    public Guid RecordId { get; set; }
    public Guid LayerId { get; set; }

    // When and who
    public DateTime ChangedAt { get; set; }
    public Guid ChangedById { get; set; }
    public string ChangedByName { get; set; } = string.Empty;

    // Type of change
    public string ChangeType { get; set; } = string.Empty; // "Created", "Updated", "Deleted"

    // Snapshot values
    public string Code { get; set; } = string.Empty;
    public string? Desc1 { get; set; }

    // What changed
    public string? ChangedFields { get; set; } // "Code, Desc1"
    public string? ChangesSummary { get; set; } // JSON: {"Code": {"old": "A", "new": "B"}}

    // Formatted display text
    public string FormattedChange { get; set; } = string.Empty;
}
