package model

import (
	model2 "cold-delivery/common/model"
	"cold-delivery/common/nats/nats_server"
)

// 运单任务
type WaybillTask struct {
	model2.Model
	WaybillNo string `json:"waybillNo"  gorm:"size:128"` // 单号
	//WarehouseId      int                          `json:"warehouseId"  gorm:"size:128"` // 仓库id
	//CarId            int                          `json:"carId"  gorm:"size:128"`       // 车辆id
	CoolerBoxId int         `json:"coolerBoxId"  gorm:"size:128"` // 保温箱id
	UserId      int         `json:"userId"  gorm:"size:128"`      // 司机/仓管id
	Sn          string      `json:"sn" gorm:"size:128"`           // sn
	StartTime   model2.Time `json:"startTime"  gorm:"size:128"`   // 签收时间
	EndTime     model2.Time `json:"endTime"  gorm:"size:128"`     // 签收时间
	//Warehouse        WarehouseOmit                `json:"warehouse"`
	//Car              CarOmit                      `json:"car"`
	CoolerBox        CoolerBoxOmit                `json:"coolerBox"`
	DeviceSensorList []nats_server.DeviceSensor_R `json:"deviceSensorList,omitempty"  gorm:"-"` // 传感器列表
	DataList         []nats_server.DeviceData_R   `json:"dataList,omitempty"  gorm:"-"`         // 传感器列表
	model2.ControlBy
	model2.ModelTime
	model2.DeptBy
}

func (WaybillTask) TableName() string {
	return "waybill_task"
}
