产品套餐状态管理
This commit is contained in:
@@ -14,7 +14,16 @@ type ProductSku struct {
|
||||
Code string `json:"code" gorm:"column:code"` // SSKU 代码:格式为 key=value,key=value,...,其中,key:value 是 SKU 的属性,多个属性用逗号分隔
|
||||
Name string `json:"name" gorm:"column:name"` // SKU 可读名称
|
||||
Price decimal.Decimal `json:"price" gorm:"column:price"` // 定价
|
||||
Status SkuStatus `json:"status" gorm:"column:status"` // SKU 状态:0-禁用,1-正常
|
||||
|
||||
Product *Product `json:"product,omitempty" gorm:"foreignKey:ProductID"`
|
||||
Discount *ProductDiscount `json:"discount,omitempty" gorm:"foreignKey:DiscountId"`
|
||||
}
|
||||
|
||||
// SkuStatus SKU 状态
|
||||
type SkuStatus int32
|
||||
|
||||
const (
|
||||
SkuStatusDisabled SkuStatus = 0 // 禁用
|
||||
SkuStatusEnabled SkuStatus = 1 // 正常
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user