namespace PromotionService.API.Application.DTOs;

/// <summary>
/// EN: Voucher DTO for API responses.
/// VI: DTO Voucher cho các phản hồi API.
/// </summary>
public record VoucherDto(
    Guid Id,
    Guid CampaignId,
    string Code,
    Guid? OwnerId,
    decimal FaceValue,
    decimal RemainingValue,
    string Status,
    DateTime? ClaimedAt,
    DateTime? ExpiresAt,
    DateTime? RedeemedAt);

/// <summary>
/// EN: Voucher summary DTO for list responses.
/// VI: DTO tóm tắt Voucher cho các phản hồi danh sách.
/// </summary>
public record VoucherSummaryDto(
    Guid Id,
    string Code,
    decimal RemainingValue,
    string Status,
    DateTime? ExpiresAt);

/// <summary>
/// EN: Voucher validation result.
/// VI: Kết quả xác thực voucher.
/// </summary>
public record VoucherValidationDto(
    bool IsValid,
    string? ErrorMessage,
    Guid? VoucherId,
    string? VoucherCode,
    decimal? RemainingValue,
    DateTime? ExpiresAt,
    string? CampaignName);

/// <summary>
/// EN: Redemption DTO.
/// VI: DTO Redemption.
/// </summary>
public record RedemptionDto(
    Guid Id,
    Guid VoucherId,
    Guid CampaignId,
    Guid UserId,
    Guid? OrderId,
    decimal AmountUsed,
    decimal AmountRefunded,
    DateTime RedeemedAt);
