1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/models/view/home.go

24 lines
368 B
Go
Raw Normal View History

2020-11-06 23:19:54 +03:00
package view
type Newsbox struct {
Type string `json:"type"`
Text string `json:"text"`
}
2020-11-06 23:19:54 +03:00
type HomeViewModel struct {
Messages
TotalHours int
TotalUsers int
Newsbox *Newsbox
2020-11-06 23:19:54 +03:00
}
func (s *HomeViewModel) WithSuccess(m string) *HomeViewModel {
s.SetSuccess(m)
2020-11-06 23:19:54 +03:00
return s
}
func (s *HomeViewModel) WithError(m string) *HomeViewModel {
s.SetError(m)
2020-11-06 23:19:54 +03:00
return s
}