using System.ComponentModel.DataAnnotations;
using ERPCore.Domain.Enums;

namespace ERPCore.Dtos.Reference;

/// <summary>Reason code (docs/11 §6).</summary>
public sealed record ReasonCodeDto(int ReasonCodeId, string Code, string Description, ReasonContext Context);

public sealed class CreateReasonCodeRequest
{
    [Required, StringLength(20)] public string Code { get; set; } = string.Empty;
    [Required, StringLength(200)] public string Description { get; set; } = string.Empty;
    [Required, EnumDataType(typeof(ReasonContext))] public ReasonContext Context { get; set; }
}
