notice.go 859 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package model
  2. import "fmt"
  3. // const .
  4. const (
  5. NoticeLogID = 241
  6. NoticeForbid = 1
  7. NoticeNoForbid = 0
  8. NoticeClear = "clear"
  9. NoticeClearAndForbid = "clear_forbid"
  10. NoticeUnForbid = "unforbid"
  11. NoticeTypeClear = 1
  12. NoticeTypeClearAndForbid = 2
  13. NoticeTypeUnForbid = 3
  14. )
  15. // NoticeUpArg .
  16. type NoticeUpArg struct {
  17. Mid int64 `form:"mid" validate:"min=1"`
  18. Type int `form:"type" validate:"min=1,max=3"`
  19. UID int64 `form:"-"`
  20. Uname string `form:"-"`
  21. }
  22. // Notice .
  23. type Notice struct {
  24. ID int64 `json:"id" form:"id"`
  25. Mid int64 `json:"mid" form:"mid" validate:"required"`
  26. Notice string `json:"notice"`
  27. IsForbid int `json:"is_forbid"`
  28. }
  29. // TableName notice
  30. func (c *Notice) TableName() string {
  31. return fmt.Sprintf("member_up_notice%d", c.Mid%10)
  32. }