mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
split IEntityWithOptionalTimestamp into a separate interface
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
export interface IEntityWithIdAndOptionalTimestamp {
|
export interface IEntityWithOptionalTimestamp {
|
||||||
id: string;
|
|
||||||
millisecondsSinceEpoch?: number;
|
millisecondsSinceEpoch?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISystem extends IEntityWithIdAndOptionalTimestamp {
|
export interface IEntityWithId {
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISystem extends IEntityWithId, IEntityWithOptionalTimestamp {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,33 +15,33 @@ export interface ICoordinates {
|
|||||||
longitude: number;
|
longitude: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IRoute extends IEntityWithIdAndOptionalTimestamp {
|
export interface IRoute extends IEntityWithId, IEntityWithOptionalTimestamp {
|
||||||
name: string;
|
name: string;
|
||||||
color: string;
|
color: string;
|
||||||
polylineCoordinates: ICoordinates[];
|
polylineCoordinates: ICoordinates[];
|
||||||
systemId: string;
|
systemId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IStop extends IEntityWithIdAndOptionalTimestamp {
|
export interface IStop extends IEntityWithId, IEntityWithOptionalTimestamp {
|
||||||
name: string;
|
name: string;
|
||||||
systemId: string;
|
systemId: string;
|
||||||
coordinates: ICoordinates;
|
coordinates: ICoordinates;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IShuttle extends IEntityWithIdAndOptionalTimestamp {
|
export interface IShuttle extends IEntityWithId, IEntityWithOptionalTimestamp {
|
||||||
coordinates: ICoordinates;
|
coordinates: ICoordinates;
|
||||||
name: string;
|
name: string;
|
||||||
routeId: string;
|
routeId: string;
|
||||||
systemId: string;
|
systemId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IEta {
|
export interface IEta extends IEntityWithOptionalTimestamp {
|
||||||
secondsRemaining: number;
|
secondsRemaining: number;
|
||||||
shuttleId: string;
|
shuttleId: string;
|
||||||
stopId: string;
|
stopId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IOrderedStop {
|
export interface IOrderedStop extends IEntityWithId, IEntityWithOptionalTimestamp {
|
||||||
nextStop?: IOrderedStop;
|
nextStop?: IOrderedStop;
|
||||||
previousStop?: IOrderedStop;
|
previousStop?: IOrderedStop;
|
||||||
routeId: string;
|
routeId: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user