using SqlSugar;
using Volo.Abp.Domain.Entities.Auditing;
using Yi.Framework.AiHub.Domain.Shared.Enums;

namespace Yi.Framework.AiHub.Domain.Entities.Pay;

/// <summary>
/// 支付通知记录
/// </summary>
[SugarTable("Ai_PayNoticeRecord")]
public class PayNoticeRecordAggregateRoot: FullAuditedAggregateRoot<Guid>
{
    /// <summary>
    /// 通知时间
    /// </summary>
    public DateTime NotifyTime { get; set; }

    /// <summary>
    /// 支付宝交易号
    /// </summary>
    public string TradeNo { get; set; }

    /// <summary>
    /// 商家订单号
    /// </summary>
    public string OutTradeNo { get; set; }

    /// <summary>
    /// 买家openId
    /// </summary>
    public string BuyerId { get; set; }

    /// <summary>
    /// 订单状态
    /// </summary>
    public TradeStatusEnum TradeStatus { get; set; }

    /// <summary>
    /// 订单金额
    /// </summary>
    public decimal TotalAmount { get; set; }

    /// <summary>
    /// 实收金额
    /// </summary>
    public decimal ReceiptAmount { get; set; }

    /// <summary>
    /// 用户支付金额
    /// </summary>
    public decimal BuyerPayAmount { get; set; }

    /// <summary>
    /// 通知原始数据
    /// </summary>
    [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string NotifyData { get; set; } = string.Empty;

    /// <summary>
    /// 原始signstr
    /// </summary>
    [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string SignStr { get; set; }
}