working on pdf export
This commit is contained in:
@@ -15,8 +15,8 @@ import (
|
||||
type SameBookingError struct{}
|
||||
|
||||
type BookingType struct {
|
||||
Id int8
|
||||
Name string
|
||||
Id int8 `json:"anwesenheit_id"`
|
||||
Name string `json:"anwesenheit_name"`
|
||||
}
|
||||
|
||||
func (e SameBookingError) Error() string {
|
||||
@@ -29,7 +29,7 @@ type Booking struct {
|
||||
CheckInOut int16 `json:"check_in_out"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
CounterId int `json:"counter_id"`
|
||||
BookingType BookingType `json:"booking_type"`
|
||||
BookingType BookingType `json:"anwesenheit_typ"`
|
||||
}
|
||||
|
||||
type IDatabase interface {
|
||||
@@ -298,7 +298,7 @@ func (b *Booking) UpdateTime(newTime time.Time) {
|
||||
}
|
||||
|
||||
func (b *Booking) ToString() string {
|
||||
return fmt.Sprintf("Booking %d: at: %s, as type: %d", b.CounterId, b.Timestamp.Format("15:04"), b.CheckInOut)
|
||||
return fmt.Sprintf("Booking %d: at: %s, CheckInOut: %d, TypeId: %d", b.CounterId, b.Timestamp.Format("15:04"), b.CheckInOut, b.BookingType.Id)
|
||||
}
|
||||
|
||||
func GetBookingTypes() ([]BookingType, error) {
|
||||
|
||||
Reference in New Issue
Block a user