business_attr.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. package model
  2. import xtime "go-common/library/time"
  3. // BusinessAttr will record business attributes
  4. type BusinessAttr struct {
  5. ID int64 `json:"id" gorm:"column:id"`
  6. BID int64 `json:"bid" gorm:"column:bid"`
  7. BusinessName string `json:"business_name" gorm:"business_name"`
  8. Name string `json:"name" gorm:"column:name"`
  9. DealType int8 `json:"deal_type" gorm:"column:deal_type"`
  10. ExpireTime int64 `json:"expire_time" gorm:"column:expire_time"`
  11. AssignType int8 `json:"assign_type" gorm:"column:assign_type"`
  12. AssignMax int8 `json:"assign_max" gorm:"column:assign_max"`
  13. GroupType int8 `json:"group_type" gorm:"column:group_type"`
  14. Button uint8 `json:"-" gorm:"button"`
  15. ButtonKey string `json:"-" gorm:"button_key"`
  16. CTime xtime.Time `json:"ctime" gorm:"column:ctime"`
  17. MTime xtime.Time `json:"mtime" gorm:"column:mtime"`
  18. Buttons []*Button `json:"button" gorm:"-"`
  19. }
  20. // TableName is used to identify chall table name in gorm
  21. func (BusinessAttr) TableName() string {
  22. return "workflow_business_attr"
  23. }
  24. // Button .
  25. type Button struct {
  26. Index int `json:"index"`
  27. Name string `json:"name"`
  28. State bool `json:"state"`
  29. Key string `json:"key"`
  30. }