using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
///
/// 退款记录表
///
[SugarTable("RefundRecord")]
public class RefundRecord : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
///
/// 商户退款单号(唯一)
///
[SugarColumn(Length = 64)]
public string OutRefundNo { get; set; }
///
/// 微信退款单号
///
[SugarColumn(Length = 64, IsNullable = true)]
public string? RefundId { get; set; }
///
/// 关联的报名记录ID
///
public long RegistrationId { get; set; }
///
/// 商户订单号
///
[SugarColumn(Length = 64)]
public string OutTradeNo { get; set; }
///
/// 微信支付订单号
///
[SugarColumn(Length = 64, IsNullable = true)]
public string? TransactionId { get; set; }
///
/// 退款金额(元)
///
[SugarColumn(DecimalDigits = 2, Length = 18)]
public decimal RefundAmount { get; set; }
///
/// 订单总金额(元)
///
[SugarColumn(DecimalDigits = 2, Length = 18)]
public decimal TotalAmount { get; set; }
///
/// 退款原因
///
[SugarColumn(Length = 512, IsNullable = true)]
public string? RefundReason { get; set; }
///
/// 退款状态(0-退款中,1-退款成功,2-退款失败,3-退款关闭)
///
public int RefundStatus { get; set; }
///
/// 申请时间
///
public DateTime ApplyTime { get; set; }
///
/// 退款完成时间
///
public DateTime? SuccessTime { get; set; }
///
/// 商户ID
///
public long? MerchantId { get; set; }
///
/// 微信支付配置ID
///
public long? WeChatPayConfigId { get; set; }
///
/// 微信返回的原始数据(JSON)
///
[SugarColumn(ColumnDataType = "text", IsNullable = true)]
public string? WeChatResponse { get; set; }
///
/// 错误信息
///
[SugarColumn(Length = 1024, IsNullable = true)]
public string? ErrorMessage { get; set; }
///
/// 可用状态
///
public AvailabilityStatus Status { get; set; }
///
/// 标记删除
///
public bool DeleteMark { get; set; }
///
/// 创建人
///
public long CreatedUserId { get; set; }
///
/// 创建时间
///
public DateTime CreatedTime { get; set; }
///
/// 更新人
///
public long? UpdatedUserId { get; set; }
///
/// 更新时间
///
public DateTime? UpdatedTime { get; set; }
}