28 lines
1.4 KiB
Go
28 lines
1.4 KiB
Go
|
|
package entity
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"assets/consts/public"
|
|||
|
|
consts "assets/consts/stock"
|
|||
|
|
"assets/model/config"
|
|||
|
|
|
|||
|
|
"gitea.com/red-future/common/beans"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
// PrivateSku 私域资产SKU实体
|
|||
|
|
type PrivateSku struct {
|
|||
|
|
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
|||
|
|
SkuName string `bson:"skuName" json:"skuName"` // SKU名称
|
|||
|
|
ImageURL string `bson:"imageUrl,omitempty" json:"imageUrl"` // SKU主图
|
|||
|
|
Price int `bson:"price" json:"price"` // 价格(分为单位)
|
|||
|
|
Stock int `bson:"stock" json:"stock"` // 库存数量
|
|||
|
|
Sort int `bson:"sort" json:"sort"` // 排序
|
|||
|
|
CapacityUnitType consts.CapacityUnitType `bson:"capacityUnitType" json:"capacityUnitType"` // 容量单位类型
|
|||
|
|
Capacity config.Capacity `bson:"capacity" json:"capacity"` //容量
|
|||
|
|
PrivateCategoryPath string `bson:"privateCategoryPath" json:"privateCategoryPath"` // 私域分类路径
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// CollectionName 获取集合名称
|
|||
|
|
func (PrivateSku) CollectionName() string {
|
|||
|
|
return public.PrivateSkuCollection
|
|||
|
|
}
|