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_PayOrder")]
public class PayOrderAggregateRoot : FullAuditedAggregateRoot<Guid>
{
    /// <summary>
    /// 商家订单号
    /// </summary>
    public string OutTradeNo { get; set; }

    /// <summary>
    /// 下单用户
    /// </summary>
    public Guid UserId { get; set; }

    /// <summary>
    /// 下单用户名称
    /// </summary>
    public string UserName { get; set; }

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

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

    /// <summary>
    /// 商品类型
    /// </summary>
    public GoodsTypeEnum GoodsType { get; set; }

    /// <summary>
    /// 商品名称
    /// </summary>
    public string GoodsName { get; set; }

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