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 {
|
2023-01-02 20:05:28 +03:00
|
|
|
Messages
|
2021-01-17 11:24:09 +03:00
|
|
|
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 {
|
2023-01-02 20:05:28 +03:00
|
|
|
s.SetSuccess(m)
|
2020-11-06 23:19:54 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *HomeViewModel) WithError(m string) *HomeViewModel {
|
2023-01-02 20:05:28 +03:00
|
|
|
s.SetError(m)
|
2020-11-06 23:19:54 +03:00
|
|
|
return s
|
|
|
|
}
|