/* eslint-disable no-unused-vars */
import { IRepository } from "@/contexts/common/domain/repositories";
import { ICollection, IQueryCriteria, UniqueID, UTCDateValue } from "@shared/contexts";
import { Quote, QuoteReference, QuoteStatus } from "../entities";

export interface IQuoteRepository extends IRepository<Quote> {
  exists(id: UniqueID): Promise<boolean>;
  existsByReference(reference: QuoteReference): Promise<boolean>;

  create(quote: Quote): Promise<void>;
  update(quote: Quote): Promise<void>;

  getById(id: UniqueID): Promise<Quote | null>;
  findAll(queryCriteria?: IQueryCriteria): Promise<ICollection<Quote>>;

  removeById(id: UniqueID): Promise<void>;

  findLastQuoteByDealerId(dealerId: UniqueID): Promise<Quote | null>;
  findLastReferenceByDealerId(dealerId: UniqueID): Promise<QuoteReference | null>;

  updateStatusById(quoteId: UniqueID, newStatus: QuoteStatus): Promise<void>;
  updateSentDateById(quoteId: UniqueID, sentDate: UTCDateValue): Promise<void>;
}
