using MediatR;
using PromotionService.API.Application.DTOs;

namespace PromotionService.API.Application.Queries;

/// <summary>
/// EN: Query to get all campaigns with pagination and filters.
/// VI: Query để lấy tất cả chiến dịch với phân trang và bộ lọc.
/// </summary>
public record GetAllCampaignsQuery(
    int PageNumber = 1,
    int PageSize = 20,
    Guid? MerchantId = null,
    string? Status = null,
    string? SearchTerm = null) : IRequest<PaginatedResponse<AdminCampaignListDto>>;

/// <summary>
/// EN: Query to get campaign statistics for admin.
/// VI: Query để lấy thống kê chiến dịch cho admin.
/// </summary>
public record GetAdminCampaignStatisticsQuery(Guid CampaignId) : IRequest<AdminCampaignStatisticsDto?>;

/// <summary>
/// EN: Query to get vouchers for a campaign.
/// VI: Query để lấy vouchers của chiến dịch.
/// </summary>
public record GetCampaignVouchersQuery(
    Guid CampaignId,
    int PageNumber = 1,
    int PageSize = 20,
    string? Status = null) : IRequest<PaginatedResponse<AdminVoucherListDto>>;

/// <summary>
/// EN: Query to get all vouchers with filters.
/// VI: Query để lấy tất cả vouchers với bộ lọc.
/// </summary>
public record GetAllVouchersQuery(
    int PageNumber = 1,
    int PageSize = 20,
    Guid? CampaignId = null,
    Guid? UserId = null,
    string? Status = null,
    string? CodeSearch = null) : IRequest<PaginatedResponse<AdminVoucherListDto>>;

/// <summary>
/// EN: Query to search vouchers by code.
/// VI: Query để tìm kiếm vouchers theo mã.
/// </summary>
public record SearchVouchersQuery(string SearchTerm) : IRequest<IEnumerable<AdminVoucherListDto>>;

/// <summary>
/// EN: Query to get all redemptions with filters.
/// VI: Query để lấy tất cả redemptions với bộ lọc.
/// </summary>
public record GetAllRedemptionsQuery(
    int PageNumber = 1,
    int PageSize = 20,
    Guid? CampaignId = null,
    Guid? VoucherId = null,
    Guid? UserId = null,
    DateTime? DateFrom = null,
    DateTime? DateTo = null) : IRequest<PaginatedResponse<AdminRedemptionListDto>>;

/// <summary>
/// EN: Query to get redemption statistics.
/// VI: Query để lấy thống kê redemption.
/// </summary>
public record GetRedemptionStatisticsQuery(Guid? CampaignId = null) : IRequest<AdminRedemptionStatisticsDto>;
