using System.ComponentModel.DataAnnotations;
namespace ROLAC.API.DTOs.Expense;

/// <summary>Request body for the expense AI assist endpoint.</summary>
public class ExpenseAiAssistRequest
{
    /// <summary>The user's free-text expense description (typically Chinese).</summary>
    [Required] public string Text { get; set; } = "";
    /// <summary>The expense amount, used as a hint when classifying the category.</summary>
    public decimal Amount { get; set; }
}

/// <summary>
/// AI suggestion for an expense: an English translation of the description plus a proposed
/// major category (大項) and sub-category (系項). Category ids are null when the model could
/// not confidently classify or returned an id outside the live catalog.
/// </summary>
public class ExpenseAiSuggestion
{
    public string? EnglishDescription { get; set; }
    /// <summary>Typo-corrected, refined Traditional Chinese description.</summary>
    public string? ChineseDescription { get; set; }
    public int?    GroupId            { get; set; }
    public int?    SubCategoryId      { get; set; }
    /// <summary>Bilingual label of the suggested group, e.g. "Consumables / 消耗品".</summary>
    public string? GroupLabel         { get; set; }
    /// <summary>Bilingual label of the suggested sub-category, e.g. "Batteries / 電池".</summary>
    public string? SubLabel           { get; set; }
    /// <summary>Model self-reported confidence in the classification, 0..1.</summary>
    public double  Confidence         { get; set; }
}
