import { ConversationEntity, ConversationStatusType } from '../entities/conversation.entity';

export interface IConversationRepository {
  save(conversation: ConversationEntity): Promise<ConversationEntity>;
  findById(id: string): Promise<ConversationEntity | null>;
  findByUserId(
    userId: string,
    options?: { status?: ConversationStatusType; limit?: number },
  ): Promise<ConversationEntity[]>;
  findForEvolution(options: {
    status?: ConversationStatusType;
    hoursBack?: number;
    minMessageCount?: number;
  }): Promise<ConversationEntity[]>;
  update(conversation: ConversationEntity): Promise<ConversationEntity>;
  count(options?: { status?: ConversationStatusType; daysBack?: number }): Promise<number>;
}

export const CONVERSATION_REPOSITORY = Symbol('IConversationRepository');
