feat: updated docs and added description to files
Some checks failed
Tests / Run Go Tests (push) Failing after 1m35s
Arbeitszeitmessung Deploy / Build Webserver (push) Successful in 2m48s

This commit is contained in:
2026-01-29 18:28:28 +01:00
parent 41c34c42cf
commit ba034f1c33
52 changed files with 458 additions and 3413 deletions

View File

@@ -1,5 +1,11 @@
package models
// this file has all functions and types to handle bookings
// the bookings itself are later combined to a workday to save on
// db requests and computation
//
// the booking data is based on the entries in the "anwesenheit" database table
import (
"arbeitszeitmessung/helper"
"arbeitszeitmessung/helper/logs"
@@ -39,7 +45,7 @@ type IDatabase interface {
var DB IDatabase
func (b *Booking) New(cardUid string, gereatId int16, checkInOut int16, typeId int8) Booking {
func (b *Booking) NewBooking(cardUid string, gereatId int16, checkInOut int16, typeId int8) Booking {
bookingType, err := GetBookingTypeById(typeId)
if err != nil {
log.Printf("Cannot get booking type %d, from database!", typeId)