Files
EmailBill/Entity/TransactionRecord.cs
孙诚 037bad2d9b
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 10s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
feat: 添加待确认分类功能,支持获取和确认未分类交易记录;优化相关组件和服务
2026-01-10 12:22:37 +08:00

91 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace Entity;
/// <summary>
/// 银行交易记录(由邮件解析生成)
/// </summary>
public class TransactionRecord : BaseEntity
{
/// <summary>
/// 卡号或账户标识
/// </summary>
public string Card { get; set; } = string.Empty;
/// <summary>
/// 交易原因/摘要
/// </summary>
public string Reason { get; set; } = string.Empty;
/// <summary>
/// 交易金额
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// 退款金额
/// </summary>
public decimal RefundAmount { get; set; }
/// <summary>
/// 交易后余额
/// </summary>
public decimal Balance { get; set; }
/// <summary>
/// 发生时间(邮件中的交易时间)
/// </summary>
public DateTime OccurredAt { get; set; }
/// <summary>
/// 原始邮件记录ID
/// </summary>
public long EmailMessageId { get; set; }
/// <summary>
/// 交易类型
/// </summary>
public TransactionType Type { get; set; }
/// <summary>
/// 交易分类
/// </summary>
public string Classify { get; set; } = string.Empty;
/// <summary>
/// 待确认的分类AI或规则建议但尚未正式确认
/// </summary>
public string? UnconfirmedClassify { get; set; }
/// <summary>
/// 待确认的类型
/// </summary>
public TransactionType? UnconfirmedType { get; set; }
/// <summary>
/// 导入编号
/// </summary>
public string ImportNo { get; set; } = string.Empty;
/// <summary>
/// 导入来源
/// </summary>
public string ImportFrom { get; set; } = string.Empty;
}
public enum TransactionType
{
/// <summary>
/// 支出
/// </summary>
Expense = 0,
/// <summary>
/// 收入
/// </summary>
Income = 1,
/// <summary>
/// 不计入收支
/// </summary>
None = 2
}