import { FindManyOptions } from 'typeorm';
import { CargoType } from '../entities/cargo-type.entity';

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

export const CARGO_TYPES_REPOSITORY = Symbol('CARGO_TYPES_REPOSITORY');
