30 lines
1.4 KiB
Go
30 lines
1.4 KiB
Go
package entity
|
||
|
||
import (
|
||
"assets/consts/public"
|
||
consts "assets/consts/stock"
|
||
"assets/model/config"
|
||
|
||
"gitea.com/red-future/common/beans"
|
||
"go.mongodb.org/mongo-driver/v2/bson"
|
||
)
|
||
|
||
// Location 库位
|
||
type Location struct {
|
||
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||
WarehouseId *bson.ObjectID `bson:"warehouseId" json:"warehouseId"` // 仓库ID
|
||
ZoneId *bson.ObjectID `bson:"zoneId" json:"zoneId"` // 库区ID
|
||
LocationCode string `bson:"locationCode" json:"locationCode"` // 库位编码
|
||
LocationName string `bson:"locationName" json:"locationName"` // 库位名称
|
||
LocationType consts.LocationType `bson:"locationType" json:"locationType"` // 库位类型
|
||
Status consts.LocationStatus `bson:"status" json:"status"` // 库位状态
|
||
CapacityUnitType consts.CapacityUnitType `bson:"capacityUnitType" json:"capacityUnitType"` // 容量单位类型
|
||
Capacity *config.Capacity `bson:"capacity" json:"capacity"` //容量
|
||
Remark string `bson:"remark" json:"remark"` // 备注
|
||
}
|
||
|
||
// CollectionName 获取集合名称
|
||
func (Location) CollectionName() string {
|
||
return public.LocationCollection
|
||
}
|