namespace Entity;

/// <summary>
/// 预算管理
/// </summary>
public class BudgetRecord : BaseEntity
{
    /// <summary>
    /// 预算名称
    /// </summary>
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 统计周期
    /// </summary>
    public BudgetPeriodType Type { get; set; } = BudgetPeriodType.Month;

    /// <summary>
    /// 预算金额
    /// </summary>
    public decimal Limit { get; set; }

    /// <summary>
    /// 预算类别
    /// </summary>
    public BudgetCategory Category { get; set; }

    /// <summary>
    /// 相关分类 (逗号分隔的分类名称)
    /// </summary>
    public string SelectedCategories { get; set; } = string.Empty;

    /// <summary>
    /// 是否停止
    /// </summary>
    public bool IsStopped { get; set; } = false;

    /// <summary>
    /// 开始日期
    /// </summary>
    public DateTime StartDate { get; set; } = DateTime.Now;
}

public enum BudgetPeriodType
{
    /// <summary>
    /// 月
    /// </summary>
    Month = 1,
    /// <summary>
    /// 年
    /// </summary>
    Year = 2
}

public enum BudgetCategory
{
    /// <summary>
    /// 支出
    /// </summary>
    Expense = 0,
    /// <summary>
    /// 收入
    /// </summary>
    Income = 1,
    /// <summary>
    /// 存款
    /// </summary>
    Savings = 2
}
