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 `json:"projectName"`
	// The week number
	Week int `json:"week"`
	// Total time spent on development
	DevelopmentTime int `json:"developmentTime"`
	// Total time spent in meetings
	MeetingTime int `json:"meetingTime"`
	// Total time spent on administrative tasks
	AdminTime int `json:"adminTime"`
	// Total time spent on personal projects
	OwnWorkTime int `json:"ownWorkTime"`
	// Total time spent on studying
	StudyTime int `json:"studyTime"`
	// Total time spent on testing
	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"`
	// The user id of the user who submitted the report
	UserId int `json:"userId" db:"user_id"`
	// The name of the project, as it appears in the database
	ProjectId int `json:"projectId" db:"project_id"`
	// 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"`
}
