diff --git a/pkg/database/station.go b/pkg/database/station.go new file mode 100644 index 0000000..b8dad2f --- /dev/null +++ b/pkg/database/station.go @@ -0,0 +1,69 @@ +package database + +// Station Information +type Station struct { + CRS string `json:"3alpha"` + TIPLOC string `json:"tiploc"` + STANOX string `json:"stanox"` + Name string `json:"name"` + Location Location `json:"location"` + Operator string `json:"operator"` + Facilities Facilities `json:"facilities,omitempty"` +} + +// Location Details +type Location struct { + Geo GeoJson `json:"geo,omitempty"` + Address Address `json:"address,omitempty"` +} + +// GeoJson Coordinates = [long, lat] +type GeoJson struct { + Type string `json:"type"` + Coordinates []float64 `json:"coordinates"` +} + +// Street address in five line format +type Address struct { + Line1 string `json:"line1,omitempty"` + Line2 string `json:"line2,omitempty"` + Line3 string `json:"line3,omitempty"` + Line4 string `json:"line4,omitempty"` + Line5 string `json:"line5,omitempty"` +} + +// Station Facilities +type Facilities struct { + Staff bool + Cctv bool + Helppoint bool + Cis bool + Tvm bool + Seating bool + WaitingRoom bool + Buffet bool + Toilets bool + BabyChange bool + Telephones bool + InductionLoop bool + NKSToilets bool + Gateline bool + Cycle Cycle + CarPark CarPark +} + +// Station Cycle Facilities +type Cycle struct { + CycleSpaces int64 `json:"cycleSpaces"` + AccessibleCycleSpaces int64 `json:"accessibleCycleSpaces"` + SpaceTypes []string `json:"spaceTypes,omitempty"` + Sheltered bool `json:"sheltered,omitempty"` + Cctv bool `json:"cctv,omitempty"` +} + +// Station Carpark Facilities +type CarPark struct { + Spaces int64 `json:"spaces"` + AccessibleSpaces int64 `json:"accessibleSpaces"` + Cctv bool `json:"cctv,omitempty"` +}