2020-11-06 23:19:54 +03:00
|
|
|
package view
|
|
|
|
|
2021-12-16 14:39:41 +03:00
|
|
|
import "github.com/muety/wakapi/models"
|
|
|
|
|
2020-11-06 23:19:54 +03:00
|
|
|
type SummaryViewModel struct {
|
2021-12-16 14:39:41 +03:00
|
|
|
*models.Summary
|
|
|
|
*models.SummaryParams
|
|
|
|
User *models.User
|
|
|
|
AvatarURL string
|
|
|
|
LanguageColors map[string]string
|
|
|
|
Error string
|
|
|
|
Success string
|
|
|
|
ApiKey string
|
|
|
|
RawQuery string
|
2020-11-06 23:19:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SummaryViewModel) WithSuccess(m string) *SummaryViewModel {
|
|
|
|
s.Success = m
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SummaryViewModel) WithError(m string) *SummaryViewModel {
|
|
|
|
s.Error = m
|
|
|
|
return s
|
|
|
|
}
|