split IEntityWithOptionalTimestamp into a separate interface

This commit is contained in:
2025-01-07 15:11:24 -08:00
parent 9f2b060c04
commit 8c9920e91b

View File

@@ -1,9 +1,12 @@
export interface IEntityWithIdAndOptionalTimestamp {
id: string;
export interface IEntityWithOptionalTimestamp {
millisecondsSinceEpoch?: number;
}
export interface ISystem extends IEntityWithIdAndOptionalTimestamp {
export interface IEntityWithId {
id: string;
}
export interface ISystem extends IEntityWithId, IEntityWithOptionalTimestamp {
name: string;
}
@@ -12,33 +15,33 @@ export interface ICoordinates {
longitude: number;
}
export interface IRoute extends IEntityWithIdAndOptionalTimestamp {
export interface IRoute extends IEntityWithId, IEntityWithOptionalTimestamp {
name: string;
color: string;
polylineCoordinates: ICoordinates[];
systemId: string;
}
export interface IStop extends IEntityWithIdAndOptionalTimestamp {
export interface IStop extends IEntityWithId, IEntityWithOptionalTimestamp {
name: string;
systemId: string;
coordinates: ICoordinates;
}
export interface IShuttle extends IEntityWithIdAndOptionalTimestamp {
export interface IShuttle extends IEntityWithId, IEntityWithOptionalTimestamp {
coordinates: ICoordinates;
name: string;
routeId: string;
systemId: string;
}
export interface IEta {
export interface IEta extends IEntityWithOptionalTimestamp {
secondsRemaining: number;
shuttleId: string;
stopId: string;
}
export interface IOrderedStop {
export interface IOrderedStop extends IEntityWithId, IEntityWithOptionalTimestamp {
nextStop?: IOrderedStop;
previousStop?: IOrderedStop;
routeId: string;