mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-03 13:38:13 +00:00
refactor: code organization
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
export type VehicleAPIResponse = IVehicle[];
|
||||
|
||||
export interface IVehicle {
|
||||
id: number;
|
||||
name: string;
|
||||
type: string;
|
||||
cabinName?: string;
|
||||
restrictions?: IVehicleRestrictions;
|
||||
vehicleGroupsId: number;
|
||||
group: IVehicleGroup;
|
||||
}
|
||||
|
||||
export interface IVehicleRestrictions {
|
||||
sponsorOnly?: number;
|
||||
teamOnly?: boolean;
|
||||
}
|
||||
|
||||
export interface IVehicleGroup {
|
||||
id: number;
|
||||
name: string;
|
||||
speed: number;
|
||||
length: number;
|
||||
weight: number;
|
||||
cargoTypes?: IVehicleCargoType[];
|
||||
locoProps?: IVehicleLocoProps;
|
||||
}
|
||||
|
||||
export interface IVehicleCargoType {
|
||||
id: string;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface IVehicleLocoProps {
|
||||
coldStart: boolean;
|
||||
doubleManned: boolean;
|
||||
}
|
||||
|
||||
export interface IVehicleTableRow {
|
||||
vehicleRef: IVehicle;
|
||||
pendingChanges: Partial<IVehicle>;
|
||||
}
|
||||
|
||||
export enum VehicleEditRowKey {
|
||||
NAME = 'name',
|
||||
TYPE = 'type',
|
||||
CABIN = 'cabinName',
|
||||
|
||||
}
|
||||
|
||||
export enum VehicleEditRestrictionKey {
|
||||
SPONSOR_ONLY = "sponsorOnly",
|
||||
TEAM_ONLY = "teamOnly"
|
||||
}
|
||||
Reference in New Issue
Block a user