Add database types

This commit is contained in:
Fred Boniface
2023-07-17 12:20:47 +01:00
parent 55fa0d7607
commit fd92f859fd
11 changed files with 74 additions and 8 deletions

10
database/corpus.ts Normal file
View File

@@ -0,0 +1,10 @@
interface Corpus {
NLC: number;
NLCDESC: string;
NLCDESC16?: string | null;
STANOX?: string | null;
TIPLOC?: string | null;
UIC?: string | null;
}
export { Corpus }

8
database/pis.ts Normal file
View File

@@ -0,0 +1,8 @@
interface Pis {
code: string;
stops: string[];
tiplocs: string[];
operator: string;
}
export { Pis }

7
database/reasonCode.ts Normal file
View File

@@ -0,0 +1,7 @@
interface ReasonCode {
code: string;
lateReason: string;
cancReason: string;
}
export { ReasonCode }

8
database/station.ts Normal file
View File

@@ -0,0 +1,8 @@
interface Station {
STANOX: string;
TIPLOC: string;
"3ALPHA": string;
NLCDESC: string;
}
export { Station }

24
database/timetable.ts Normal file
View File

@@ -0,0 +1,24 @@
interface Stop {
publicDeparture?: string | null;
wttDeparture?: string | null;
publicArrival?: string | null;
wttArrival?: string | null;
isPublic: boolean;
tiploc: string;
}
interface Service {
transactionType: string;
stpIndicator: string;
operator: string;
trainUid: string;
headcode: string;
powerType: string;
planSpeed: string;
scheduleStartDate: Date;
scheduleEndDate: Date;
daysRun: string[];
stops: Stop[];
}
export { Stop, Service }

7
database/user.ts Normal file
View File

@@ -0,0 +1,7 @@
interface User {
uuid: string;
domain: string;
atime: Date;
}
export { User }