2020-11-06 23:19:54 +03:00
|
|
|
package view
|
|
|
|
|
2022-08-13 11:28:36 +03:00
|
|
|
type Newsbox struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
}
|
|
|
|
|
2020-11-06 23:19:54 +03:00
|
|
|
type HomeViewModel struct {
|
2021-01-17 11:24:09 +03:00
|
|
|
Success string
|
|
|
|
Error string
|
|
|
|
TotalHours int
|
|
|
|
TotalUsers int
|
2022-08-13 11:28:36 +03:00
|
|
|
Newsbox *Newsbox
|
2020-11-06 23:19:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HomeViewModel) WithSuccess(m string) *HomeViewModel {
|
|
|
|
s.Success = m
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HomeViewModel) WithError(m string) *HomeViewModel {
|
|
|
|
s.Error = m
|
|
|
|
return s
|
|
|
|
}
|