aboutsummaryrefslogtreecommitdiffstats
path: root/timetask/time_entry.go
blob: 161de3e41cf064f4b8324d5907a3020617718244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package timetask

import "time"

type TimeEntry struct {
	PersonID    int
	Client      int
	Project     int
	Module      int
	Task        int
	WorkType    int
	Date        time.Time
	Time        int
	Billable    bool
	Description string
}

func NewTimeEntry(
	profile Profile,
	project Project,
	date time.Time,
	time int,
	description string,
) TimeEntry {
	return TimeEntry{
		PersonID: profile.PersonID,
		Client: project.Client,
		Project: project.Project,
		Module: project.Module,
		Task: project.Task,
		WorkType: project.WorkType,
		Date: date,
		Time: time,
		Billable: project.Billable,
		Description: description,
	}
}