using CMSMicroservice.Application.Common.Models;
using MediatR;

namespace CMSMicroservice.Application.DiscountShopCQ.Queries.GetDiscountProducts;

public class GetDiscountProductsQuery : IRequest<GetDiscountProductsResponseDto>
{
    public PaginationState? PaginationQuery { get; set; }
    public long? CategoryId { get; set; }
    public string? SearchTerm { get; set; }
    /// <summary>
    /// true = فقط موجود (RemainingCount &gt; 0)، false = فقط ناموجود
    /// </summary>
    public bool? InStock { get; set; }
    public bool? IsActive { get; set; }
    public int? MinPrice { get; set; }
    public int? MaxPrice { get; set; }
    public string? SortBy { get; set; }
}

public class GetDiscountProductsResponseDto
{
    public MetaData MetaData { get; set; }
    public List<DiscountProductDto> Models { get; set; }
}

public class DiscountProductDto
{
    public long Id { get; set; }
    public string Title { get; set; }
    public string ShortInfomation { get; set; }
    public long Price { get; set; }
    public int MaxDiscountPercent { get; set; }
    public int Rate { get; set; }
    public string ImagePath { get; set; }
    public string ThumbnailPath { get; set; }
    public int SaleCount { get; set; }
    public int ViewCount { get; set; }
    public int RemainingCount { get; set; }
    public bool IsActive { get; set; }
}
