using CMSMicroservice.Domain.Enums;

namespace CMSMicroservice.Application.ClubMembershipCycleHistoryCQ.Queries.GetAllClubMembershipCycleHistoryByFilter;

public record GetAllClubMembershipCycleHistoryByFilterQuery : IRequest<GetAllClubMembershipCycleHistoryByFilterResponseDto>
{
    public PaginationState? PaginationState { get; init; }
    public string? SortBy { get; init; }
    public GetAllClubMembershipCycleHistoryByFilterFilter? Filter { get; init; }
}

public class GetAllClubMembershipCycleHistoryByFilterFilter
{
    public long? UserId { get; set; }
    public long? ClubMembershipCycleId { get; set; }
    public int? CycleNumber { get; set; }
    public ClubMembershipCycleAction? Action { get; set; }
    public DateTime? CreatedFrom { get; set; }
    public DateTime? CreatedTo { get; set; }
}

public class GetAllClubMembershipCycleHistoryByFilterResponseDto
{
    public MetaData MetaData { get; set; }
    public List<GetAllClubMembershipCycleHistoryByFilterResponseModel>? Models { get; set; }
}

public class GetAllClubMembershipCycleHistoryByFilterResponseModel
{
    public long Id { get; set; }
    public long ClubMembershipCycleId { get; set; }
    public long UserId { get; set; }
    public string UserName { get; set; } = string.Empty;
    public int CycleNumber { get; set; }
    public bool OldIsCurrentCycle { get; set; }
    public bool NewIsCurrentCycle { get; set; }
    public DateTime? OldMagicStartedAt { get; set; }
    public DateTime? NewMagicStartedAt { get; set; }
    public DateTime? OldMagicCompletedAt { get; set; }
    public DateTime? NewMagicCompletedAt { get; set; }
    public ClubMembershipCycleAction Action { get; set; }
    public string? PerformedBy { get; set; }
    public string? Reason { get; set; }
    public DateTimeOffset Created { get; set; }
}
