mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
add an id string argument for the system
This commit is contained in:
@@ -8,12 +8,22 @@ import { ShuttleGetterSetterRepository } from "../repositories/ShuttleGetterSett
|
|||||||
|
|
||||||
export interface InterchangeSystemBuilderArguments {
|
export interface InterchangeSystemBuilderArguments {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID to identify the system internally and in the API.
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID for fetching shuttle data from the Passio GO! system.
|
||||||
|
*/
|
||||||
passioSystemId: string;
|
passioSystemId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class InterchangeSystem {
|
export class InterchangeSystem {
|
||||||
constructor(
|
constructor(
|
||||||
public name: string,
|
public name: string,
|
||||||
|
public id: string,
|
||||||
public shuttleDataLoader: ShuttleRepositoryLoader,
|
public shuttleDataLoader: ShuttleRepositoryLoader,
|
||||||
public shuttleRepository: ShuttleGetterSetterRepository,
|
public shuttleRepository: ShuttleGetterSetterRepository,
|
||||||
public notificationScheduler: ETANotificationScheduler,
|
public notificationScheduler: ETANotificationScheduler,
|
||||||
@@ -38,6 +48,7 @@ export class InterchangeSystem {
|
|||||||
|
|
||||||
return new InterchangeSystem(
|
return new InterchangeSystem(
|
||||||
args.name,
|
args.name,
|
||||||
|
args.id,
|
||||||
shuttleDataLoader,
|
shuttleDataLoader,
|
||||||
shuttleRepository,
|
shuttleRepository,
|
||||||
notificationScheduler,
|
notificationScheduler,
|
||||||
|
|||||||
Reference in New Issue
Block a user