namespace Entity; public class BudgetArchive : BaseEntity { /// /// 归档目标年份 /// public int Year { get; set; } /// /// 归档目标月份 /// public int Month { get; set; } /// /// 归档内容 /// [JsonMap] public BudgetArchiveContent[] Content { get; set; } = []; /// /// 归档日期 /// public DateTime ArchiveDate { get; set; } = DateTime.Now; /// /// 支出结余(预算 - 实际,正数表示省钱,负数表示超支) /// public decimal ExpenseSurplus { get; set; } /// /// 收入结余(实际 - 预算,正数表示超额收入,负数表示未达预期) /// public decimal IncomeSurplus { get; set; } public string? Summary { get; set; } } public record BudgetArchiveContent { /// /// 预算ID /// public long Id { get; set; } /// /// 预算名称 /// public string Name { get; set; } = string.Empty; /// /// 统计周期 /// public BudgetPeriodType Type { get; set; } = BudgetPeriodType.Month; /// /// 预算金额 /// public decimal Limit { get; set; } /// /// 实际金额 /// public decimal Actual { get; set; } /// /// 预算类别 /// public BudgetCategory Category { get; set; } /// /// 相关分类 (逗号分隔的分类名称) /// public string[] SelectedCategories { get; set; } = []; /// /// 不记额预算 /// public bool NoLimit { get; set; } = false; /// /// 硬性消费 /// public bool IsMandatoryExpense { get; set; } = false; /// /// 描述说明 /// public string Description { get; set; } = string.Empty; }