ADD: first api route get bookings

This commit is contained in:
2024-09-05 18:10:13 +02:00
parent 19ccdadd32
commit 113d676e57
3 changed files with 53 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ import (
"log"
"net/url"
"strconv"
"time"
)
type SameBookingError struct{}
@@ -14,9 +15,11 @@ func (e SameBookingError) Error() string {
}
type Booking struct {
CardID string `json:"cradID"`
ReaderID string `json:"readerID"`
BookingType int `json:"bookingTyp"`
CardID string `json:"cradID"`
ReaderID string `json:"readerID"`
BookingType int `json:"bookingTyp"`
LoggedTime time.Time `json:"loggedTime"`
Id int `json:"id"`
}
func (b Booking) New(card_id string, reader_id string, booking_type int) Booking {