package main 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"` EndTime string `json:"end_time"` CreatedAt time.Time `json:"created_at"` Username string `json:"username"` } 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"` ExpectedHours float64 `json:"expected_hours"` RemainingHours float64 `json:"remaining_hours"` } type User struct { ID int `json:"id"` Username string `json:"username"` Password string `json:"-"` IsAdmin bool `json:"is_admin"` WeeklyHours float64 `json:"weekly_hours"` } type Schedule struct { ID int `json:"id"` DayOfWeek int `json:"day_of_week"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` Type string `json:"type"` Title string `json:"title"` } type LoginRequest struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` } type LoginResponse struct { Token string `json:"token"` Username string `json:"username"` IsAdmin bool `json:"is_admin"` } type CreateUserRequest struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required,min=6"` IsAdmin bool `json:"is_admin"` WeeklyHours float64 `json:"weekly_hours"` } type UpdateUserRequest struct { Username string `json:"username"` WeeklyHours float64 `json:"weekly_hours"` } type ResetPasswordRequest struct { NewPassword string `json:"new_password" validate:"required,min=6"` } type UpdateTimeEntryRequest struct { Date string `json:"date"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` Type string `json:"type"` } type Claims struct { UserID int `json:"user_id"` Username string `json:"username"` IsAdmin bool `json:"is_admin"` }