Major changes related to reports
This commit is contained in:
parent
3526decbad
commit
d99de54c5d
12 changed files with 81 additions and 98 deletions
21
backend/internal/types/WeeklyReport.go
Normal file
21
backend/internal/types/WeeklyReport.go
Normal 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
|
||||
}
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue