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