event.go 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. package model
  2. import xtime "go-common/library/time"
  3. // consts for workflow event
  4. const (
  5. // EventAdminReply 管理员回复
  6. EventAdminReply = 1
  7. // EventAdminNote 管理员回复并记录
  8. EventAdminNote = 2
  9. // EventUserReply 用户回复
  10. EventUserReply = 3
  11. // EventSystem 系统回复
  12. EventSystem = 4
  13. )
  14. // Event model is the model for challenge changes
  15. type Event struct {
  16. Eid int64 `json:"eid" gorm:"column:id"`
  17. Cid int64 `json:"cid" gorm:"column:cid"`
  18. AdminID int64 `json:"adminid" gorm:"column:adminid"`
  19. Content string `json:"content" gorm:"column:content"`
  20. Attachments string `json:"attachments" gorm:"column:attachments"`
  21. Event int8 `json:"event" gorm:"column:event"`
  22. CTime xtime.Time `json:"ctime" gorm:"column:ctime"`
  23. MTime xtime.Time `json:"mtime" gorm:"column:mtime"`
  24. Admin string `json:"admin" gorm:"-"`
  25. }
  26. // TableName is used to identify table name in gorm
  27. func (Event) TableName() string {
  28. return "workflow_event"
  29. }