cooler_box.go 930 B

1234567891011121314151617181920212223242526272829303132
  1. package model
  2. import model2 "cold-delivery/common/model"
  3. const (
  4. CoolerBoxStatusNormal = "2"
  5. CoolerBoxStatusDisable = "1"
  6. )
  7. // 保温箱
  8. type CoolerBox struct {
  9. model2.Model
  10. Name string `json:"name" gorm:"size:128"` // 商品名称
  11. Sn string `json:"sn" gorm:"size:128"` // sn
  12. Status string `json:"status" gorm:"size:4;not null;default:'2';comment:状态"` // 1-停用 2-正常
  13. HistorySn model2.StringList `json:"historySn"` // 历史绑定的sn
  14. model2.ControlBy
  15. model2.ModelTime
  16. model2.DeptBy
  17. }
  18. type CoolerBoxOmit struct {
  19. Id int `json:"id,omitempty"` // 主键编码
  20. Name string `json:"name,omitempty"` // 商品名称
  21. }
  22. func (CoolerBox) TableName() string {
  23. return "cooler_box"
  24. }
  25. func (CoolerBoxOmit) TableName() string {
  26. return "cooler_box"
  27. }