dialog.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. package model
  2. import "go-common/library/time"
  3. // ConfDialog .
  4. type ConfDialog struct {
  5. ID int64 `gorm:"column:id" json:"id" form:"id"`
  6. AppID int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  7. Platform int64 `gorm:"column:platform" json:"platform" form:"platform"`
  8. StartTime time.Time `gorm:"column:start_time" json:"start_time" form:"start_time"`
  9. EndTime time.Time `gorm:"column:end_time" json:"end_time" form:"end_time" default:"32503651200"` //3000-01-01 00:00:00
  10. Title string `gorm:"column:title" json:"title" form:"title" validate:"required"`
  11. Content string `gorm:"column:content" json:"content" form:"content" validate:"required"`
  12. Follow bool `gorm:"column:follow" json:"follow" form:"follow"`
  13. LeftButton string `gorm:"column:left_button" json:"left_button" form:"left_button"`
  14. LeftLink string `gorm:"column:left_link" json:"left_link" form:"left_link"`
  15. RightButton string `gorm:"column:right_button" json:"right_button" form:"right_button" validate:"required"`
  16. RightLink string `gorm:"column:right_link" json:"right_link" form:"right_link"`
  17. Operator string `gorm:"column:operator" json:"operator"`
  18. Stage bool `gorm:"column:stage" json:"stage" form:"stage" default:"true"`
  19. Ctime time.Time `gorm:"column:ctime" json:"ctime" form:"ctime"`
  20. Mtime time.Time `gorm:"column:mtime" json:"mtime" form:"mtime"`
  21. }
  22. // TableName for grom.
  23. func (c *ConfDialog) TableName() string {
  24. return "vip_conf_dialog"
  25. }
  26. // ConfDialogList admin list model.
  27. type ConfDialogList struct {
  28. *ConfDialog
  29. Status string `json:"status"`
  30. }