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

public class ExpenseSubCategoryDto
{
    public int     Id        { get; set; }
    public int     GroupId   { get; set; }
    public string  Name_en   { get; set; } = "";
    public string? Name_zh   { get; set; }
    public int     SortOrder { get; set; }
    public bool    IsActive  { get; set; }
    public int?    Form990LineId   { get; set; }
    public string? Form990LineCode { get; set; }
    public int?    Form1099BoxId   { get; set; }
    public string? Form1099BoxCode { get; set; }
}

public class ExpenseCategoryGroupDto
{
    public int     Id        { get; set; }
    public string  Name_en   { get; set; } = "";
    public string? Name_zh   { get; set; }
    public int     SortOrder { get; set; }
    public bool    IsActive  { get; set; }
    public int?    Form990LineId   { get; set; }
    public string? Form990LineCode { get; set; }
    public int?    Form1099BoxId   { get; set; }
    public string? Form1099BoxCode { get; set; }
    public List<ExpenseSubCategoryDto> SubCategories { get; set; } = [];
}

public class CreateExpenseGroupRequest
{
    [Required, MaxLength(200)] public string Name_en { get; set; } = "";
    [MaxLength(200)] public string? Name_zh { get; set; }
    public int SortOrder { get; set; }
    public int? Form990LineId { get; set; }
    public int? Form1099BoxId { get; set; }
}
public class UpdateExpenseGroupRequest : CreateExpenseGroupRequest
{
    public bool IsActive { get; set; } = true;
}

public class CreateExpenseSubCategoryRequest
{
    [Required] public int GroupId { get; set; }
    [Required, MaxLength(200)] public string Name_en { get; set; } = "";
    [MaxLength(200)] public string? Name_zh { get; set; }
    public int SortOrder { get; set; }
    public int? Form990LineId { get; set; }
    public int? Form1099BoxId { get; set; }
}
public class UpdateExpenseSubCategoryRequest : CreateExpenseSubCategoryRequest
{
    public bool IsActive { get; set; } = true;
}
