namespace Application.Dto.Transaction; /// /// 交易响应 /// public record TransactionResponse { public long Id { get; init; } public DateTime OccurredAt { get; init; } public string Reason { get; init; } = string.Empty; public decimal Amount { get; init; } public decimal Balance { get; init; } public TransactionType Type { get; init; } public string Classify { get; init; } = string.Empty; public string? UnconfirmedClassify { get; init; } public TransactionType? UnconfirmedType { get; init; } } /// /// 创建交易请求 /// public record CreateTransactionRequest { public string OccurredAt { get; init; } = string.Empty; public string? Reason { get; init; } public decimal Amount { get; init; } public TransactionType Type { get; init; } public string? Classify { get; init; } } /// /// 更新交易请求 /// public record UpdateTransactionRequest { public long Id { get; init; } public string? Reason { get; init; } public decimal Amount { get; init; } public decimal Balance { get; init; } public TransactionType Type { get; init; } public string? Classify { get; init; } public string? OccurredAt { get; init; } } /// /// 交易查询请求 /// public record TransactionQueryRequest { public int PageIndex { get; init; } = 1; public int PageSize { get; init; } = 20; public string? SearchKeyword { get; init; } public string? Classify { get; init; } public int? Type { get; init; } public int? Year { get; init; } public int? Month { get; init; } public DateTime? StartDate { get; init; } public DateTime? EndDate { get; init; } public string? Reason { get; init; } public bool SortByAmount { get; init; } } /// /// 分页结果 /// public record PagedResult { public T[] Data { get; init; } = []; public int Total { get; init; } } /// /// 批量更新分类项 /// public record BatchUpdateClassifyItem { public long Id { get; init; } public string? Classify { get; init; } public TransactionType? Type { get; init; } } /// /// 按摘要批量更新请求 /// public record BatchUpdateByReasonRequest { public string Reason { get; init; } = string.Empty; public TransactionType Type { get; init; } public string Classify { get; init; } = string.Empty; } /// /// 一句话录账解析请求 /// public record ParseOneLineRequest { public string Text { get; init; } = string.Empty; } /// /// 确认所有未确认记录请求 /// public record ConfirmAllUnconfirmedRequest { public long[] Ids { get; init; } = []; }