mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
36 lines
1.4 KiB
TypeScript
36 lines
1.4 KiB
TypeScript
import { IRoute, IShuttle, IStop, ISystem } from "../src/entities/entities";
|
|
|
|
// Use a single set of generators in case any of the
|
|
// interfaces change in the future
|
|
|
|
export function generateMockSystems(): ISystem[] {
|
|
return [
|
|
{ id: "1", name: "System A" },
|
|
{ id: "2", name: "System B" },
|
|
{ id: "3", name: "System C" },
|
|
];
|
|
}
|
|
|
|
export function generateMockShuttles(): IShuttle[] {
|
|
return [
|
|
{ id: "sh1", name: "Shuttle A", routeId: "r1", systemId: "sys1", coordinates: { latitude: 10, longitude: 20 } },
|
|
{ id: "sh2", name: "Shuttle B", routeId: "r2", systemId: "sys2", coordinates: { latitude: 15, longitude: 25 } },
|
|
{ id: "sh3", name: "Shuttle C", routeId: "r3", systemId: "sys3", coordinates: { latitude: 30, longitude: 40 } },
|
|
];
|
|
}
|
|
|
|
export function generateMockRoutes(): IRoute[] {
|
|
return [
|
|
{ id: "r1", name: "Route 1", color: "red", systemId: "sys1", polylineCoordinates: [] },
|
|
{ id: "r2", name: "Route 2", color: "blue", systemId: "sys2", polylineCoordinates: [] },
|
|
{ id: "r3", name: "Route 3", color: "green", systemId: "sys3", polylineCoordinates: [] },
|
|
];
|
|
}
|
|
|
|
export function generateMockStops(): IStop[] {
|
|
return [
|
|
{ id: "st1", name: "Stop A", systemId: "sys1", coordinates: { latitude: 10, longitude: 20 } },
|
|
{ id: "st2", name: "Stop B", systemId: "sys2", coordinates: { latitude: 15, longitude: 25 } },
|
|
{ id: "st3", name: "Stop C", systemId: "sys3", coordinates: { latitude: 30, longitude: 40 } },
|
|
];
|
|
} |