export const SAVED_LISTING_REPOSITORY = Symbol('SAVED_LISTING_REPOSITORY');

export interface FavoriteListingSummary {
  id: string;
  title: string;
  priceVND: string;
  city: string;
  district: string;
  thumbnailUrl: string | null;
  status: string;
  transactionType: string;
}

export interface FavoriteItem {
  id: string;
  listingId: string;
  createdAt: Date;
  listing: FavoriteListingSummary;
}

export interface ListFavoritesParams {
  page: number;
  limit: number;
}

export interface ListFavoritesResult {
  data: FavoriteItem[];
  total: number;
}

export interface ISavedListingRepository {
  add(userId: string, listingId: string): Promise<{ id: string; createdAt: Date }>;
  remove(userId: string, listingId: string): Promise<void>;
  exists(userId: string, listingId: string): Promise<boolean>;
  listByUser(userId: string, params: ListFavoritesParams): Promise<ListFavoritesResult>;
}
