using System.ComponentModel.DataAnnotations;
namespace ROLAC.API.DTOs.Expense;
/// Request body for the expense AI assist endpoint.
public class ExpenseAiAssistRequest
{
/// The user's free-text expense description (typically Chinese).
[Required] public string Text { get; set; } = "";
/// The expense amount, used as a hint when classifying the category.
public decimal Amount { get; set; }
}
///
/// 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.
///
public class ExpenseAiSuggestion
{
public string? EnglishDescription { get; set; }
/// Typo-corrected, refined Traditional Chinese description.
public string? ChineseDescription { get; set; }
public int? GroupId { get; set; }
public int? SubCategoryId { get; set; }
/// Bilingual label of the suggested group, e.g. "Consumables / 消耗品".
public string? GroupLabel { get; set; }
/// Bilingual label of the suggested sub-category, e.g. "Batteries / 電池".
public string? SubLabel { get; set; }
/// Model self-reported confidence in the classification, 0..1.
public double Confidence { get; set; }
}
///
/// Request body for the expense-category AI assist endpoint: refine the name, translate to English,
/// and suggest a Form 990 line for an expense category (大項/小項) being defined or edited.
///
public class ExpenseCategoryAiRequest
{
/// The user-typed Chinese name (the primary input).
public string Name_zh { get; set; } = "";
/// The English name, if already typed (extra context for the model).
public string? Name_en { get; set; }
/// "group" (大項) or "sub" (小項); selects the prompt framing.
public string Level { get; set; } = "group";
/// For a sub-category: the parent group's bilingual name, used for context.
public string? ParentGroupName { get; set; }
/// For a sub-category: the parent group's mapped Form 990 line id, used to bias the choice.
public int? ParentForm990LineId { get; set; }
}
///
/// AI suggestion for an expense category: a refined Chinese name, an English translation, and a
/// proposed Form 990 line. Line fields are null when the model returned an id outside the live catalog.
///
public class CategoryAiSuggestion
{
/// Typo-corrected, refined Traditional Chinese name.
public string? ChineseName { get; set; }
public string? EnglishName { get; set; }
public int? Form990LineId { get; set; }
/// Bilingual label of the suggested line, e.g. "16 — Occupancy / 場地".
public string? Form990LineLabel { get; set; }
/// Model self-reported confidence in the mapping, 0..1.
public double Confidence { get; set; }
}