import { FindManyOptions } from 'typeorm';
import { SurchargeType } from '../entities/surcharge-type.entity';

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

export const SURCHARGE_TYPES_REPOSITORY = Symbol('SURCHARGE_TYPES_REPOSITORY');
