using MediatR;
using FacebookService.API.Application.Dtos;

namespace FacebookService.API.Application.Queries;

/// <summary>
/// EN: Query to get a Conversation by ID with messages.
/// VI: Query để lấy một Conversation theo ID với tin nhắn.
/// </summary>
/// <param name="ConversationId">EN: Conversation ID / VI: ID conversation</param>
/// <param name="IncludeMessages">EN: Whether to include messages / VI: Có bao gồm tin nhắn không</param>
public record GetConversationByIdQuery(
    Guid ConversationId,
    bool IncludeMessages = true
) : IRequest<ConversationDto?>;

/// <summary>
/// EN: Query to get conversations with pagination.
/// VI: Query để lấy danh sách conversations với phân trang.
/// </summary>
/// <param name="ShopId">EN: Shop ID / VI: ID shop</param>
/// <param name="Status">EN: Optional status filter / VI: Lọc theo status tùy chọn</param>
/// <param name="Skip">EN: Number to skip / VI: Số lượng bỏ qua</param>
/// <param name="Take">EN: Number to take / VI: Số lượng lấy</param>
public record GetConversationsQuery(
    Guid? ShopId = null,
    string? Status = null,
    int Skip = 0,
    int Take = 20
) : IRequest<GetConversationsQueryResult>;

/// <summary>
/// EN: Result of GetConversationsQuery.
/// VI: Kết quả của GetConversationsQuery.
/// </summary>
public record GetConversationsQueryResult(
    IReadOnlyList<ConversationSummaryDto> Conversations,
    int TotalCount
);
