using CMSMicroservice.Domain.Enums;

namespace CMSMicroservice.Application.UserPackagePurchaseCQ.Queries.GetAllUserPackagePurchaseByFilter;

public record GetAllUserPackagePurchaseByFilterQuery : IRequest<GetAllUserPackagePurchaseByFilterResponseDto>
{
    public PaginationState? PaginationState { get; init; }
    public string? SortBy { get; init; }
    public GetAllUserPackagePurchaseByFilterFilter? Filter { get; init; }
}

public class GetAllUserPackagePurchaseByFilterFilter
{
    public long? UserId { get; set; }
    public long? PackageId { get; set; }
    public PackagePurchaseMethod? PurchaseMethod { get; set; }
    public DateTime? PurchasedFrom { get; set; }
    public DateTime? PurchasedTo { get; set; }
    public long? MinAmount { get; set; }
    public long? MaxAmount { get; set; }
}

public class GetAllUserPackagePurchaseByFilterResponseDto
{
    public MetaData MetaData { get; set; }
    public List<GetAllUserPackagePurchaseByFilterResponseModel>? Models { get; set; }
}

public class GetAllUserPackagePurchaseByFilterResponseModel
{
    public long Id { get; set; }
    public long UserId { get; set; }
    public string UserName { get; set; } = string.Empty;
    public string UserMobile { get; set; } = string.Empty;
    public long PackageId { get; set; }
    public string PackageName { get; set; } = string.Empty;
    public PackagePurchaseMethod PurchaseMethod { get; set; }
    public DateTime PurchasedAt { get; set; }
    public long Amount { get; set; }
    public long? OrderId { get; set; }
    public long? TransactionId { get; set; }
    public DateTimeOffset Created { get; set; }
}
