add type IEntityWithId to implement unified search function later

This commit is contained in:
2024-12-22 14:10:28 -08:00
parent e3d6d71825
commit f792554ae0

View File

@@ -1,8 +1,11 @@
// If types match closely, we can use TypeScript "casting"
// to convert from data repo to GraphQL schema
export interface ISystem {
export interface IEntityWithId {
id: string;
}
export interface ISystem extends IEntityWithId {
name: string;
}
@@ -11,24 +14,21 @@ export interface ICoordinates {
longitude: number;
}
export interface IRoute {
id: string;
export interface IRoute extends IEntityWithId {
name: string;
color: string;
polylineCoordinates: ICoordinates[];
systemId: string;
}
export interface IStop {
id: string;
export interface IStop extends IEntityWithId {
name: string;
systemId: string;
coordinates: ICoordinates;
}
export interface IShuttle {
export interface IShuttle extends IEntityWithId {
coordinates: ICoordinates;
id: string;
name: string;
routeId: string;
systemId: string;