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

28 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"
)
// 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
}