campus-errand/server/Models/Withdrawal.cs
2026-04-17 19:10:41 +08:00

53 lines
1.4 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.

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace CampusErrand.Models;
/// <summary>
/// 提现记录表
/// </summary>
public class Withdrawal
{
[Key]
public int Id { get; set; }
/// <summary>用户 ID</summary>
public int UserId { get; set; }
/// <summary>提现金额</summary>
[Column(TypeName = "decimal(10,2)")]
public decimal Amount { get; set; }
/// <summary>收款方式</summary>
public PaymentMethod PaymentMethod { get; set; }
/// <summary>收款二维码图片</summary>
[MaxLength(512)]
public string QrCodeImage { get; set; } = string.Empty;
/// <summary>状态</summary>
public WithdrawalStatus Status { get; set; } = WithdrawalStatus.Pending;
/// <summary>申请时间</summary>
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
/// <summary>处理时间</summary>
public DateTime? ProcessedAt { get; set; }
/// <summary>微信转账单号</summary>
[MaxLength(64)]
public string TransferBillNo { get; set; } = string.Empty;
/// <summary>微信转账 package_info用户确认收款用</summary>
[MaxLength(512)]
public string PackageInfo { get; set; } = string.Empty;
/// <summary>拒绝理由</summary>
[MaxLength(256)]
public string RejectReason { get; set; } = string.Empty;
// 导航属性
[ForeignKey(nameof(UserId))]
public User? User { get; set; }
}