import { FindManyOptions } from 'typeorm';
import { ShippingLine } from '../entities/shipping-line.entity';

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

export const SHIPPING_LINES_REPOSITORY = Symbol('SHIPPING_LINES_REPOSITORY');
