using MediatR;

namespace AdsAnalyticsService.API.Application.Queries;

/// <summary>
/// EN: Query to get campaign metrics for a specific date range.
/// VI: Query lấy metrics chiến dịch cho khoảng thời gian cụ thể.
/// </summary>
public record GetCampaignMetricsQuery : IRequest<CampaignMetricsDto?>
{
    public Guid CampaignId { get; init; }
    public DateTime StartDate { get; init; }
    public DateTime EndDate { get; init; }
}

/// <summary>
/// EN: Campaign metrics DTO.
/// VI: DTO metrics chiến dịch.
/// </summary>
public record CampaignMetricsDto
{
    public Guid CampaignId { get; init; }
    public DateTime StartDate { get; init; }
    public DateTime EndDate { get; init; }
    public long TotalImpressions { get; init; }
    public long TotalClicks { get; init; }
    public long TotalConversions { get; init; }
    public decimal TotalSpend { get; init; }
    public decimal TotalRevenue { get; init; }
    public decimal CTR { get; init; }
    public decimal CPC { get; init; }
    public decimal CPA { get; init; }
    public decimal ROAS { get; init; }
}
