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:
2025-07-20 22:13:03 +00:00
committed by bissendorf
parent e395b0b4ca
commit 4b7866da03
20 changed files with 408 additions and 33 deletions

35
model/external/stwbremen/restaurant.go vendored Normal file
View 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"`
}