import { IRepository } from "@/contexts/common/domain";
import { ICollection, IQueryCriteria, UniqueID } from "@shared/contexts";
import { Dealer } from "../entities";

export interface IDealerRepository extends IRepository<any> {
  exists(id: UniqueID): Promise<boolean>;
  create(dealer: Dealer): Promise<void>;
  update(dealer: Dealer): Promise<void>;

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

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

  getByUserId(userId: UniqueID): Promise<Dealer | null>;
}
