diff options
Diffstat (limited to 'timetask')
-rw-r--r-- | timetask/time_entry.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/timetask/time_entry.go b/timetask/time_entry.go index 1cc4203..161de3e 100644 --- a/timetask/time_entry.go +++ b/timetask/time_entry.go @@ -3,6 +3,7 @@ package timetask import "time" type TimeEntry struct { + PersonID int Client int Project int Module int @@ -13,3 +14,24 @@ type TimeEntry struct { 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, + } +} |