import { FindManyOptions } from 'typeorm';
import { Yard } from '../entities/yard.entity';

export interface IYardsRepository {
  findById(id: string): Promise<Yard | null>;
  findByCode(code: string): Promise<Yard | null>;
  findAll(options?: FindManyOptions<Yard>): Promise<Yard[]>;
  findAndCount(options?: FindManyOptions<Yard>): Promise<[Yard[], number]>;
  create(data: Partial<Yard>): Promise<Yard>;
  update(id: string, data: Partial<Yard>): Promise<Yard | null>;
  softDelete(id: string): Promise<void>;
}

export const YARDS_REPOSITORY = Symbol('YARDS_REPOSITORY');
