Added GetWeeklyReportsUser function and handler, also corresponding tests to both GetWeeklyReportsUser and handler added

This commit is contained in:
dDogge 2024-03-19 19:04:45 +01:00
parent 2f3730ca90
commit 2b41085865
7 changed files with 131 additions and 0 deletions

View file

@ -20,6 +20,27 @@ type NewWeeklyReport struct {
TestingTime int `json:"testingTime"`
}
type WeeklyReportList struct {
// The name of the project, as it appears in the database
ProjectName string `json:"projectName" db:"project_name"`
// The week number
Week int `json:"week" db:"week"`
// Total time spent on development
DevelopmentTime int `json:"developmentTime" db:"development_time"`
// Total time spent in meetings
MeetingTime int `json:"meetingTime" db:"meeting_time"`
// Total time spent on administrative tasks
AdminTime int `json:"adminTime" db:"admin_time"`
// Total time spent on personal projects
OwnWorkTime int `json:"ownWorkTime" db:"own_work_time"`
// Total time spent on studying
StudyTime int `json:"studyTime" db:"study_time"`
// Total time spent on testing
TestingTime int `json:"testingTime" db:"testing_time"`
// The project manager who signed it
SignedBy *int `json:"signedBy" db:"signed_by"`
}
type WeeklyReport struct {
// The ID of the report
ReportId int `json:"reportId" db:"report_id"`