Files
EmailBill/Entity/TransactionPeriodic.cs
孙诚 9719c6043a
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 30s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
新增定时账单功能
2025-12-29 15:20:32 +08:00

88 lines
1.9 KiB
C#
Raw Permalink 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 TransactionPeriodic : BaseEntity
{
/// <summary>
/// 周期类型0-每天、1-每周、2-每月、3-每季度、4-每年
/// </summary>
public PeriodicType PeriodicType { get; set; }
/// <summary>
/// 周期配置JSON格式存储不同周期类型的配置
/// 每周:存储星期几,如 "1,3,5" 表示周一、三、五
/// 每月:存储具体日期,如 "1,15" 表示每月1号和15号
/// 每季度:存储季度开始后第几天,如 "15" 表示每季度第15天
/// 每年:存储年开始后第几天,如 "100" 表示每年第100天
/// </summary>
public string PeriodicConfig { get; set; } = string.Empty;
/// <summary>
/// 交易金额
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// 交易类型
/// </summary>
public TransactionType Type { get; set; }
/// <summary>
/// 交易分类
/// </summary>
public string Classify { get; set; } = string.Empty;
/// <summary>
/// 交易摘要/备注
/// </summary>
public string Reason { get; set; } = string.Empty;
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnabled { get; set; } = true;
/// <summary>
/// 下次执行时间
/// </summary>
public DateTime? NextExecuteTime { get; set; }
/// <summary>
/// 最后执行时间
/// </summary>
public DateTime? LastExecuteTime { get; set; }
}
/// <summary>
/// 周期类型枚举
/// </summary>
public enum PeriodicType
{
/// <summary>
/// 每天
/// </summary>
Daily = 0,
/// <summary>
/// 每周
/// </summary>
Weekly = 1,
/// <summary>
/// 每月
/// </summary>
Monthly = 2,
/// <summary>
/// 每季度
/// </summary>
Quarterly = 3,
/// <summary>
/// 每年
/// </summary>
Yearly = 4
}