import { type InquiryEntity } from '../entities/inquiry.entity';
import { type InquiryReadDto } from './inquiry-read.dto';

export const INQUIRY_REPOSITORY = Symbol('INQUIRY_REPOSITORY');

export interface PaginatedResult<T> {
  data: T[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
}

export interface IInquiryRepository {
  findById(id: string): Promise<InquiryEntity | null>;
  save(inquiry: InquiryEntity): Promise<void>;
  markAsRead(id: string): Promise<void>;
  findByListing(listingId: string, page: number, limit: number): Promise<PaginatedResult<InquiryReadDto>>;
  findByAgent(agentId: string, page: number, limit: number): Promise<PaginatedResult<InquiryReadDto>>;
  countUnreadByAgent(agentId: string): Promise<number>;
}
