using System;

namespace HoneyBox.Model.Entities;

/// <summary>
/// 支付通知记录表，记录微信支付回调通知
/// </summary>
public partial class OrderNotify
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 商户订单号
    /// </summary>
    public string OrderNo { get; set; } = null!;

    /// <summary>
    /// 微信支付订单号
    /// </summary>
    public string? TransactionId { get; set; }

    /// <summary>
    /// 回调通知URL
    /// </summary>
    public string? NotifyUrl { get; set; }

    /// <summary>
    /// 随机字符串
    /// </summary>
    public string? NonceStr { get; set; }

    /// <summary>
    /// 支付时间
    /// </summary>
    public DateTime? PayTime { get; set; }

    /// <summary>
    /// 支付金额（单位：元）
    /// </summary>
    public decimal PayAmount { get; set; }

    /// <summary>
    /// 处理状态：0=待处理，1=处理成功，2=处理失败
    /// </summary>
    public byte Status { get; set; }

    /// <summary>
    /// 重试次数
    /// </summary>
    public int RetryCount { get; set; }

    /// <summary>
    /// 附加数据（订单类型）
    /// </summary>
    public string? Attach { get; set; }

    /// <summary>
    /// 用户OpenId
    /// </summary>
    public string? OpenId { get; set; }

    /// <summary>
    /// 原始回调数据
    /// </summary>
    public string? RawData { get; set; }

    /// <summary>
    /// 错误信息
    /// </summary>
    public string? ErrorMessage { get; set; }

    /// <summary>
    /// 扩展数据（JSON格式）
    /// </summary>
    public string? Extend { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime UpdatedAt { get; set; }
}
