mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
add type IEntityWithId to implement unified search function later
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
// If types match closely, we can use TypeScript "casting"
|
// If types match closely, we can use TypeScript "casting"
|
||||||
// to convert from data repo to GraphQL schema
|
// to convert from data repo to GraphQL schema
|
||||||
|
|
||||||
export interface ISystem {
|
export interface IEntityWithId {
|
||||||
id: string;
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISystem extends IEntityWithId {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,24 +14,21 @@ export interface ICoordinates {
|
|||||||
longitude: number;
|
longitude: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IRoute {
|
export interface IRoute extends IEntityWithId {
|
||||||
id: string;
|
|
||||||
name: string;
|
name: string;
|
||||||
color: string;
|
color: string;
|
||||||
polylineCoordinates: ICoordinates[];
|
polylineCoordinates: ICoordinates[];
|
||||||
systemId: string;
|
systemId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IStop {
|
export interface IStop extends IEntityWithId {
|
||||||
id: string;
|
|
||||||
name: string;
|
name: string;
|
||||||
systemId: string;
|
systemId: string;
|
||||||
coordinates: ICoordinates;
|
coordinates: ICoordinates;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IShuttle {
|
export interface IShuttle extends IEntityWithId {
|
||||||
coordinates: ICoordinates;
|
coordinates: ICoordinates;
|
||||||
id: string;
|
|
||||||
name: string;
|
name: string;
|
||||||
routeId: string;
|
routeId: string;
|
||||||
systemId: string;
|
systemId: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user