53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
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; }
|
||
}
|