feat: add Logging Middleware, saving Token and better Handling
This commit is contained in:
parent
2c4fc7869a
commit
d74046522b
8 changed files with 926 additions and 236 deletions
|
|
@ -4,6 +4,26 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
type TimeEntry struct {
|
||||
ID int `json:"id"`
|
||||
UserID int `json:"user_id"`
|
||||
ScheduleID int `json:"schedule_id"`
|
||||
Date string `json:"date"`
|
||||
Type string `json:"type"`
|
||||
StartTime string `json:"start_time"` // Neu
|
||||
EndTime string `json:"end_time"` // Neu
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Username string `json:"username"` // Neu - für Join
|
||||
}
|
||||
|
||||
type WeeklyHours struct {
|
||||
UserID int `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
Week int `json:"week"`
|
||||
Year int `json:"year"`
|
||||
TotalHours float64 `json:"total_hours"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int `json:"id"`
|
||||
Username string `json:"username"`
|
||||
|
|
@ -20,14 +40,14 @@ type Schedule struct {
|
|||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
type TimeEntry struct {
|
||||
ID int `json:"id"`
|
||||
UserID int `json:"user_id"`
|
||||
ScheduleID int `json:"schedule_id"`
|
||||
Date string `json:"date"`
|
||||
Type string `json:"type"` // "lesson" or "break"
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
// type TimeEntry struct {
|
||||
// ID int `json:"id"`
|
||||
// UserID int `json:"user_id"`
|
||||
// ScheduleID int `json:"schedule_id"`
|
||||
// Date string `json:"date"`
|
||||
// Type string `json:"type"` // "lesson" or "break"
|
||||
// CreatedAt time.Time `json:"created_at"`
|
||||
// }
|
||||
|
||||
type LoginRequest struct {
|
||||
Username string `json:"username"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue