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 { 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;