import type { MessageEntity } from '../entities/message.entity';
import type { MessageType } from '../value-objects/message-type.vo';

export const MESSAGE_REPOSITORY = Symbol('MESSAGE_REPOSITORY');

export interface CreateMessageDto {
  conversationId: string;
  senderId: string;
  type: MessageType;
  content: string;
  metadata?: Record<string, unknown>;
}

export interface IMessageRepository {
  create(dto: CreateMessageDto): Promise<MessageEntity>;
  findByConversationId(conversationId: string, limit?: number, before?: string): Promise<MessageEntity[]>;
  findById(id: string): Promise<MessageEntity | null>;
  softDelete(id: string, senderId: string): Promise<void>;
}
