reply.go 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. package model
  2. import "fmt"
  3. // ReplyRecordParams search params.
  4. type ReplyRecordParams struct {
  5. Bsp *BasicSearchParams
  6. Mid int64 `form:"mid" params:"mid"`
  7. Types []int64 `form:"types,split" params:"types"`
  8. States []int64 `form:"states,split" params:"states"`
  9. CTimeFrom string `form:"ctime_from" params:"ctime_from"`
  10. CTimeTo string `form:"ctime_to" params:"ctime_to"`
  11. }
  12. // ReplyRecordUpdateParams search params.
  13. type ReplyRecordUpdateParams struct {
  14. ID int64 `json:"id"`
  15. OID int64 `json:"oid"`
  16. MID int64 `json:"mid"`
  17. State int `json:"state"`
  18. }
  19. // IndexName .
  20. func (m *ReplyRecordUpdateParams) IndexName() string {
  21. return fmt.Sprintf("replyrecord_%d", m.MID%100)
  22. }
  23. // IndexType .
  24. func (m *ReplyRecordUpdateParams) IndexType() string {
  25. return "base"
  26. }
  27. // IndexID .
  28. func (m *ReplyRecordUpdateParams) IndexID() string {
  29. return fmt.Sprintf("%d_%d", m.ID, m.OID)
  30. }