meta_info.go 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package user
  2. import (
  3. "time"
  4. )
  5. type StatusType string
  6. type SourceType string
  7. type MetaType string
  8. const (
  9. UserNoticeType MetaType = "USER_NOTICE"
  10. InitMetaType MetaType = "INIT"
  11. PendingMetaType MetaType = "PENDING"
  12. FinishMetaType MetaType = "FINISH"
  13. FailedMetaType MetaType = "FAILED"
  14. ReportSourceType SourceType = "REPORT"
  15. VideoSourceType SourceType = "VIDEO"
  16. AudioSourceType SourceType = "AUDIO"
  17. )
  18. // MetaInfo 表示 meta_infos 表的模型
  19. type MetaInfo struct {
  20. Id int `gorm:"primaryKey;autoIncrement;column:id"`
  21. Uid int `gorm:"column:uid"`
  22. Meta string `gorm:"column:meta"`
  23. From string `gorm:"column:from"`
  24. To string `gorm:"column:to"`
  25. SourceType SourceType `gorm:"column:source_type;type:enum('REPORT','VIDEO','AUDIO')"`
  26. MetaType MetaType `gorm:"column:meta_type;type:enum('USER_NOTICE')"`
  27. Status StatusType `gorm:"column:status;type:enum('INIT','PENDING','FINISH','FAILED')"`
  28. CreatedTime time.Time
  29. UpdatedTime time.Time
  30. }