namespace SicboSub.Api.DTO
{
    #region Request DTOs

    /// <summary>
    /// Request yêu cầu OTP cho Exchange
    /// </summary>
    public class ExchangeRequestOtpReq
    {
        public string msisdn { get; set; } = null!;
        public decimal configId { get; set; }
        public string? lang { get; set; }
    }

    /// <summary>
    /// Request xác thực OTP
    /// </summary>
    public class ExchangeVerifyOtpReq
    {
        public string msisdn { get; set; } = null!;
        public string otpCode { get; set; } = null!;
        public string? lang { get; set; }
    }

    /// <summary>
    /// Request gửi lại OTP
    /// </summary>
    public class ExchangeResendOtpReq
    {
        public string msisdn { get; set; } = null!;
        public string? lang { get; set; }
    }

    /// <summary>
    /// Request lịch sử đổi thưởng
    /// </summary>
    public class ExchangeHistoryReq
    {
        public string msisdn { get; set; } = null!;
        public string? lang { get; set; }
        public string? fromDate { get; set; }
        public string? toDate { get; set; }
        public int pageNumber { get; set; }
        public int pageSize { get; set; }
    }

    #endregion

    #region Response DTOs

    /// <summary>
    /// Response sau khi request OTP thành công
    /// </summary>
    public class ExchangeRequestOtpRes
    {
        public decimal otpId { get; set; }
        public int expiresInSeconds { get; set; }
        public decimal coinAmount { get; set; }
        public decimal moneyAmount { get; set; }
    }

    /// <summary>
    /// Response sau khi verify OTP thành công
    /// </summary>
    public class ExchangeVerifyOtpRes
    {
        public decimal exchangeId { get; set; }
        public decimal coinDeducted { get; set; }
        public decimal moneyAdded { get; set; }
        public decimal newBalance { get; set; }
    }

    /// <summary>
    /// Response khi OTP verify thất bại
    /// </summary>
    public class ExchangeVerifyOtpErrorRes
    {
        public int attemptsRemaining { get; set; }
    }

    /// <summary>
    /// Response thông tin chi tiết gói Exchange
    /// </summary>
    public class ExchangeConfigRes
    {
        public decimal id { get; set; }
        public string productName { get; set; } = null!;
        public decimal coinCost { get; set; }
        public decimal moneyReceived { get; set; }
        public decimal feeCoin { get; set; }
        public string? description { get; set; }
    }

    /// <summary>
    /// Response lịch sử Exchange
    /// </summary>
    public class ExchangeHistoryRes
    {
        public decimal id { get; set; }
        public string msisdn { get; set; } = null!;
        public decimal coinDeducted { get; set; }
        public decimal moneyAdded { get; set; }
        public DateTime exchangeTime { get; set; }
        public byte status { get; set; }
        public string? statusName { get; set; }
    }

    #endregion
}
