move entities to separate file

This commit is contained in:
2025-01-06 20:52:48 -08:00
parent 9a5bceedc1
commit 413a943c28
2 changed files with 49 additions and 48 deletions

47
src/entities/entities.ts Normal file
View File

@@ -0,0 +1,47 @@
export interface IEntityWithId {
id: string;
}
export interface ISystem extends IEntityWithId {
name: string;
}
export interface ICoordinates {
latitude: number;
longitude: number;
}
export interface IRoute extends IEntityWithId {
name: string;
color: string;
polylineCoordinates: ICoordinates[];
systemId: string;
}
export interface IStop extends IEntityWithId {
name: string;
systemId: string;
coordinates: ICoordinates;
}
export interface IShuttle extends IEntityWithId {
coordinates: ICoordinates;
name: string;
routeId: string;
systemId: string;
}
export interface IEta {
secondsRemaining: number;
shuttleId: string;
stopId: string;
}
export interface IOrderedStop {
nextStop?: IOrderedStop;
previousStop?: IOrderedStop;
routeId: string;
stopId: string;
position: number;
}