Major changes related to reports

This commit is contained in:
Imbus 2024-03-16 22:47:19 +01:00
parent 3526decbad
commit d99de54c5d
12 changed files with 81 additions and 98 deletions

View file

@ -0,0 +1,21 @@
package types
// This is what should be submitted to the server, the username will be derived from the JWT token
type NewWeeklyReport struct {
// The name of the project, as it appears in the database
ProjectName string
// The week number
Week int
// Total time spent on development
DevelopmentTime int
// Total time spent in meetings
MeetingTime int
// Total time spent on administrative tasks
AdminTime int
// Total time spent on personal projects
OwnWorkTime int
// Total time spent on studying
StudyTime int
// Total time spent on testing
TestingTime int
}

View file

@ -8,9 +8,8 @@ type Project struct {
Owner string `json:"owner" db:"owner_user_id"`
}
// As it arrives from the client
// As it arrives from the client, Owner is derived from the JWT token
type NewProject struct {
Name string `json:"name"`
Description string `json:"description"`
Owner string `json:"owner"`
}

View file

@ -16,6 +16,7 @@ func (u *User) ToPublicUser() (*PublicUser, error) {
}, nil
}
// Should be used when registering, for example
type NewUser struct {
Username string `json:"username"`
Password string `json:"password"`