90 lines
2.5 KiB
C#
90 lines
2.5 KiB
C#
namespace Application.Dto;
|
|
|
|
/// <summary>
|
|
/// 预算响应
|
|
/// </summary>
|
|
public record BudgetResponse
|
|
{
|
|
public long Id { get; init; }
|
|
public string Name { get; init; } = string.Empty;
|
|
public BudgetPeriodType Type { get; init; }
|
|
public decimal Limit { get; init; }
|
|
public decimal Current { get; init; }
|
|
public BudgetCategory Category { get; init; }
|
|
public string[] SelectedCategories { get; init; } = [];
|
|
public DateTime StartDate { get; init; }
|
|
public bool NoLimit { get; init; }
|
|
public bool IsMandatoryExpense { get; init; }
|
|
public decimal UsagePercentage { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 创建预算请求
|
|
/// </summary>
|
|
public record CreateBudgetRequest
|
|
{
|
|
public string Name { get; init; } = string.Empty;
|
|
public BudgetPeriodType Type { get; init; } = BudgetPeriodType.Month;
|
|
public decimal Limit { get; init; }
|
|
public BudgetCategory Category { get; init; }
|
|
public string[] SelectedCategories { get; init; } = [];
|
|
public DateTime? StartDate { get; init; }
|
|
public bool NoLimit { get; init; }
|
|
public bool IsMandatoryExpense { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新预算请求
|
|
/// </summary>
|
|
public record UpdateBudgetRequest
|
|
{
|
|
public long Id { get; init; }
|
|
public string Name { get; init; } = string.Empty;
|
|
public BudgetPeriodType Type { get; init; } = BudgetPeriodType.Month;
|
|
public decimal Limit { get; init; }
|
|
public BudgetCategory Category { get; init; }
|
|
public string[] SelectedCategories { get; init; } = [];
|
|
public DateTime? StartDate { get; init; }
|
|
public bool NoLimit { get; init; }
|
|
public bool IsMandatoryExpense { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 分类统计响应
|
|
/// </summary>
|
|
public record BudgetCategoryStatsResponse
|
|
{
|
|
public BudgetStatsDetail Month { get; init; } = new();
|
|
public BudgetStatsDetail Year { get; init; } = new();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 统计详情
|
|
/// </summary>
|
|
public record BudgetStatsDetail
|
|
{
|
|
public decimal Limit { get; init; }
|
|
public decimal Current { get; init; }
|
|
public decimal Remaining { get; init; }
|
|
public decimal UsagePercentage { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 未覆盖分类响应
|
|
/// </summary>
|
|
public record UncoveredCategoryResponse
|
|
{
|
|
public string Category { get; init; } = string.Empty;
|
|
public decimal Amount { get; init; }
|
|
public int Count { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新归档总结请求
|
|
/// </summary>
|
|
public record UpdateArchiveSummaryRequest
|
|
{
|
|
public DateTime ReferenceDate { get; init; }
|
|
public string? Summary { get; init; }
|
|
}
|