import { Issuer, IssuerStatus } from '../entities/issuer.entity';

export const ISSUER_REPOSITORY = Symbol('IIssuerRepository');

export interface IIssuerRepository {
  findById(id: string): Promise<Issuer | null>;
  findByUserId(userId: string): Promise<Issuer | null>;
  create(data: Partial<Issuer>): Promise<Issuer>;
  save(issuer: Issuer): Promise<Issuer>;
  updateStatus(id: string, status: IssuerStatus): Promise<void>;
  findAndCount(options: {
    status?: string;
    search?: string;
    page: number;
    limit: number;
  }): Promise<[Issuer[], number]>;
  findPending(take: number): Promise<Issuer[]>;
  findByIds(ids: string[]): Promise<Issuer[]>;
  count(where?: Partial<Record<string, any>>): Promise<number>;
}
