-
Notifications
You must be signed in to change notification settings - Fork 12
/
writer.go
42 lines (36 loc) · 1.04 KB
/
writer.go
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
38
39
40
41
42
package report
import "time"
type PrintableData struct {
Start time.Time
End time.Time
SchedulesData []*ScheduleData
UsersSchedulesSummary []*UserSchedulesSummary
}
type ScheduleData struct {
ID string
Name string
RotaUsers []*ScheduleUser
}
type UserSchedulesSummary struct {
Name string
NumWorkHours float32
TotalAmountWorkHours float32
NumWeekendHours float32
TotalAmountWeekendHours float32
NumBankHolidaysHours float32
TotalAmountBankHolidaysHours float32
TotalAmount float32
}
type ScheduleUser struct {
Name string
NumWorkHours float32
TotalAmountWorkHours float32
NumWeekendHours float32
TotalAmountWeekendHours float32
NumBankHolidaysHours float32
TotalAmountBankHolidaysHours float32
TotalAmount float32
}
type Writer interface {
GenerateReport(data *PrintableData) (string, error)
}