Files
assets/model/entity/stock/location.go
2026-03-18 10:18:03 +08:00

30 lines
1.4 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
}