mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 21:20:57 +00:00
21 lines
745 B
TypeScript
21 lines
745 B
TypeScript
import { FindManyOptions } from 'typeorm';
|
|
import { Rate } from '../entities/rate.entity';
|
|
|
|
export interface IRatesRepository {
|
|
findById(id: string): Promise<Rate | null>;
|
|
findLiveRates(): Promise<Rate[]>;
|
|
findByPattern(pattern: {
|
|
rateType: string;
|
|
containerTypeId?: string | null;
|
|
cargoTypeId?: string | null;
|
|
tradeDirection?: string | null;
|
|
}): Promise<Rate | null>;
|
|
findAll(options?: FindManyOptions<Rate>): Promise<Rate[]>;
|
|
findAndCount(options?: FindManyOptions<Rate>): Promise<[Rate[], number]>;
|
|
create(data: Partial<Rate>): Promise<Rate>;
|
|
update(id: string, data: Partial<Rate>): Promise<Rate | null>;
|
|
softDelete(id: string): Promise<void>;
|
|
}
|
|
|
|
export const RATES_REPOSITORY = Symbol('RATES_REPOSITORY');
|