using MediatR;

namespace ChatService.API.Application.Commands.Conversations;

/// <summary>
/// EN: Command to create a new conversation.
/// VI: Command để tạo cuộc hội thoại mới.
/// </summary>
public record CreateConversationCommand(
    Guid CreatorId,
    IEnumerable<Guid> ParticipantIds,
    string? Name = null,
    string? AvatarUrl = null,
    bool IsGroup = false
) : IRequest<CreateConversationResult>;

public record CreateConversationResult(
    Guid ConversationId,
    string Type,
    string? Name,
    IEnumerable<ParticipantDto> Participants,
    DateTime CreatedAt
);

public record ParticipantDto(
    Guid ChatUserId,
    string DisplayName,
    string? AvatarUrl,
    string Role
);
