mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
add repository methods
This commit is contained in:
6
src/repositories/ParkingGetterRepository.ts
Normal file
6
src/repositories/ParkingGetterRepository.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { IParkingStructure } from "../entities/ParkingRepositoryEntities";
|
||||||
|
|
||||||
|
export interface ParkingGetterRepository {
|
||||||
|
getParkingStructures(): Promise<IParkingStructure[]>;
|
||||||
|
getParkingStructureById(id: string): Promise<IParkingStructure | null>;
|
||||||
|
}
|
||||||
10
src/repositories/ParkingGetterSetterRepository.ts
Normal file
10
src/repositories/ParkingGetterSetterRepository.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { IParkingStructure } from "../entities/ParkingRepositoryEntities";
|
||||||
|
import { ParkingGetterRepository } from "./ParkingGetterRepository";
|
||||||
|
|
||||||
|
export interface ParkingGetterSetterRepository extends ParkingGetterRepository {
|
||||||
|
addOrUpdateParkingStructure(structure: IParkingStructure): Promise<void>;
|
||||||
|
|
||||||
|
removeParkingStructureIfExists(id: string): Promise<IParkingStructure | null>;
|
||||||
|
|
||||||
|
clearParkingStructureData(): Promise<void>;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user