123456789101112131415161718192021222324252627282930313233343536 |
- package model
- import (
- model2 "cold-delivery/common/model"
- natsModel "cold-delivery/common/nats/nats_server"
- )
- const (
- CoolerBoxStatusNormal = "2"
- CoolerBoxStatusDisable = "1"
- )
- // 保温箱
- type CoolerBox struct {
- model2.Model
- Name string `json:"name" gorm:"size:128"` // 商品名称
- Sn string `json:"sn" gorm:"size:128"` // sn
- Status string `json:"status" gorm:"size:4;not null;default:'2';comment:状态"` // 1-停用 2-正常
- HistorySn model2.StringList `json:"historySn"` // 历史绑定的sn
- DeviceData natsModel.DeviceData_R2 `json:"deviceData" gorm:"-"`
- model2.ControlBy
- model2.ModelTime
- model2.DeptBy
- }
- type CoolerBoxOmit struct {
- Id int `json:"id,omitempty"` // 主键编码
- Name string `json:"name,omitempty"` // 商品名称
- }
- func (CoolerBox) TableName() string {
- return "cooler_box"
- }
- func (CoolerBoxOmit) TableName() string {
- return "cooler_box"
- }
|