2026-03-18 10:18:03 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
public "assets/consts/public"
|
|
|
|
|
|
consts "assets/consts/stock"
|
|
|
|
|
|
"assets/model/config"
|
|
|
|
|
|
|
2026-06-10 15:40:17 +08:00
|
|
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
2026-03-18 10:18:03 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Warehouse 仓库
|
|
|
|
|
|
type Warehouse struct {
|
|
|
|
|
|
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
|
|
|
|
|
WarehouseCode string `bson:"warehouseCode" json:"warehouseCode"` // 仓库编码
|
|
|
|
|
|
WarehouseName string `bson:"warehouseName" json:"warehouseName"` // 仓库名称
|
|
|
|
|
|
Address string `bson:"address" json:"address"` // 仓库地址
|
|
|
|
|
|
ContactPerson string `bson:"contactPerson" json:"contactPerson"` // 联系人
|
|
|
|
|
|
ContactPhone string `bson:"contactPhone" json:"contactPhone"` // 联系电话
|
|
|
|
|
|
Status consts.WarehouseStatus `bson:"status" json:"status"` // 仓库状态
|
|
|
|
|
|
Capacity *map[consts.CapacityUnitType]config.Capacity `bson:"capacity" json:"capacity"` // 容量
|
|
|
|
|
|
Remark string `bson:"remark" json:"remark"` // 备注
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// CollectionName 获取集合名称
|
|
|
|
|
|
func (Warehouse) CollectionName() string {
|
|
|
|
|
|
return public.WarehouseCollection
|
|
|
|
|
|
}
|