add new report handler
This commit is contained in:
6
models/date.go
Normal file
6
models/date.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package models
|
||||
|
||||
type Date struct {
|
||||
From string ` json:"from,omitempty"`
|
||||
To string ` json:"to,omitempty"`
|
||||
}
|
||||
20
models/report.go
Normal file
20
models/report.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
type ReportFilter struct {
|
||||
Weekdays Weekdays `json:"weekdays"`
|
||||
Date Date `json:"date"`
|
||||
Groups []uint `json:"groupIds,omitempty"`
|
||||
Name []string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
type Report struct {
|
||||
Data map[string]*Data `json:"data,omitempty"`
|
||||
Attendees []*Member `json:"attendees,omitempty"`
|
||||
NonAttendees []*Member `json:"nonAttendees,omitempty"`
|
||||
}
|
||||
|
||||
type Data struct {
|
||||
Minimal int `json:"minimal,omitempty"`
|
||||
Average int `json:"average,omitempty"`
|
||||
Maximal int `json:"maximal,omitempty"`
|
||||
}
|
||||
11
models/weekdays.go
Normal file
11
models/weekdays.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package models
|
||||
|
||||
type Weekdays struct {
|
||||
Monday bool `json:"monday,omitempty"`
|
||||
Tuesday bool `json:"tuesday,omitempty"`
|
||||
Wednesday bool `json:"wednesday,omitempty"`
|
||||
Thursday bool `json:"thursday,omitempty"`
|
||||
Friday bool `json:"friday,omitempty"`
|
||||
Saturday bool `json:"saturday,omitempty"`
|
||||
Sunday bool `json:"sunday,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user