using MediatR;
using TakeoutSaaS.Application.App.Payments.Dto;
using TakeoutSaaS.Domain.Payments.Enums;

namespace TakeoutSaaS.Application.App.Payments.Commands;

/// <summary>
/// 创建支付记录命令。
/// </summary>
public sealed class CreatePaymentCommand : IRequest<PaymentDto>
{
    /// <summary>
    /// 订单 ID。
    /// </summary>
    public long OrderId { get; set; }

    /// <summary>
    /// 支付方式。
    /// </summary>
    public PaymentMethod Method { get; set; } = PaymentMethod.Unknown;

    /// <summary>
    /// 支付状态。
    /// </summary>
    public PaymentStatus Status { get; set; } = PaymentStatus.Unpaid;

    /// <summary>
    /// 金额。
    /// </summary>
    public decimal Amount { get; set; }

    /// <summary>
    /// 系统交易号。
    /// </summary>
    public string? TradeNo { get; set; }

    /// <summary>
    /// 渠道单号。
    /// </summary>
    public string? ChannelTransactionId { get; set; }

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

    /// <summary>
    /// 备注。
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 原始回调。
    /// </summary>
    public string? Payload { get; set; }
}
