mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +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"
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user