topic.go 494 B

1234567891011121314151617181920
  1. package databus
  2. import (
  3. "go-common/library/time"
  4. )
  5. // TableName case tablename
  6. func (*Topic) TableName() string {
  7. return "topic"
  8. }
  9. // Topic topic
  10. type Topic struct {
  11. ID int `gorm:"column:id" json:"id"`
  12. Topic string `gorm:"column:topic" json:"topic"`
  13. Cluster string `gorm:"column:cluster" json:"cluster"`
  14. Remark string `gorm:"column:remark" json:"remark"`
  15. Ctime time.Time `gorm:"column:ctime" json:"ctime"`
  16. Mtime time.Time `gorm:"column:mtime" json:"-"`
  17. }