package model import model2 "cold-delivery/common/model" import natsModel "cold-delivery/common/nats/nats_server" const ( IceLockerStatusNormal = "2" IceLockerStatusDisable = "1" ) // 仓库 type IceLocker struct { model2.Model Name string `json:"name" gorm:"size:128"` // 冷冻柜名称 Status string `json:"status" gorm:"size:4;not null;default:'2';comment:状态"` // 1-停用 2-正常 Sn string `json:"sn" gorm:"size:128"` // sn HistorySn model2.StringList `json:"historySn"` // 历史绑定的sn DeviceData natsModel.DeviceData_R2 `json:"deviceData" gorm:"-"` model2.ControlBy model2.ModelTime model2.DeptBy } type IceLockerOmit struct { Id int `json:"id,omitempty"` // 主键编码 Name string `json:"name,omitempty"` // 冷冻柜名称 } func (IceLocker) TableName() string { return "ice_locker" } func (IceLockerOmit) TableName() string { return "ice_locker" }