feat: add universities and restaurants (#4)
Features: - Allow to search for individual resources by their name - Add new resources and their handler: Universities, Restaurants - Added new parameter to reverse output order Reviewed-on: #4 Co-authored-by: bdoerfchen <git@bissendorf.co> Co-committed-by: bdoerfchen <git@bissendorf.co>
This commit is contained in:
35
model/external/stwbremen/restaurant.go
vendored
Normal file
35
model/external/stwbremen/restaurant.go
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
package stwbremen
|
||||
|
||||
type RestaurantList struct {
|
||||
Items []string `json:"items"`
|
||||
}
|
||||
|
||||
type Restaurant struct {
|
||||
Title string `json:"title"`
|
||||
ID string `json:"id"`
|
||||
Image string `json:"image"`
|
||||
Address string `json:"address"`
|
||||
|
||||
OpeningHours
|
||||
}
|
||||
|
||||
type OpeningHours struct {
|
||||
OpeningTimes []OpeningTime `json:"openingTimes"`
|
||||
OffseasonOpeningTimes []OpeningTime `json:"offseasonOpeningTimes"`
|
||||
OffseasonStart DateOnly `json:"offseasonStart"`
|
||||
OffseasonEnd DateOnly `json:"offseasonEnd"`
|
||||
ChangedTimes []ChangedTime `json:"changedTimes"`
|
||||
}
|
||||
|
||||
type OpeningTime struct {
|
||||
Weekday string `json:"weekday"`
|
||||
OpeningTime TimeOnly `json:"openingTime"`
|
||||
ClosingTime TimeOnly `json:"closingTime"`
|
||||
}
|
||||
|
||||
type ChangedTime struct {
|
||||
StartDate DateOnly `json:"startDate"`
|
||||
EndDate DateOnly `json:"endDate"`
|
||||
OpeningTime TimeOnly `json:"openingTime"`
|
||||
ClosingTime TimeOnly `json:"closingTime"`
|
||||
}
|
||||
Reference in New Issue
Block a user