car.go 815 B

12345678910111213141516171819202122232425262728
  1. package model
  2. import model2 "cold-logistics/common/model"
  3. // 仓库
  4. type Car struct {
  5. model2.Model
  6. CarNo string `json:"carNo" gorm:"size:128"` // 商品名称
  7. Sn string `json:"sn" gorm:"size:128"` // sn
  8. Status string `json:"status" gorm:"size:4;not null;default:'2';comment:状态"` // 1-停用 2-正启用
  9. UserId int `json:"userId" gorm:"size:255;"` // 司机id
  10. User SysUserOmit `json:"user"`
  11. model2.ControlBy
  12. model2.ModelTime
  13. model2.DeptBy
  14. }
  15. type CarOmit struct {
  16. Id int `json:"id,omitempty"` // 主键编码
  17. CarNo string `json:"carNo,omitempty"` // 商品名称
  18. }
  19. func (Car) TableName() string {
  20. return "car"
  21. }
  22. func (CarOmit) TableName() string {
  23. return "car"
  24. }