using MediatR;

namespace CMSMicroservice.Application.DiscountShopCQ.Commands.PlaceOrder;

public class PlaceOrderCommand : IRequest<PlaceOrderResponseDto>
{
    public long UserId { get; set; }
    public long UserAddressId { get; set; }
    public long DiscountBalanceToUse { get; set; }
}

public class PlaceOrderResponseDto
{
    public bool Success { get; set; }
    public string Message { get; set; }
    public long? OrderId { get; set; }
    public long? TransactionId { get; set; }
    public long TotalAmount { get; set; }
    public long DiscountBalanceUsed { get; set; }
    public long GatewayAmountRequired { get; set; }
    
    /// <summary>
    /// URL درگاه پرداخت — اگر null باشد یعنی نیاز به پرداخت آنلاین نیست
    /// </summary>
    public string? PaymentUrl { get; set; }
}
