支付功能动态化扩展

This commit is contained in:
2026-03-18 13:07:06 +08:00
parent 99853b8514
commit 9d996acf5f
16 changed files with 1402 additions and 195 deletions

19
web/models/product_sku.go Normal file
View File

@@ -0,0 +1,19 @@
package models
import (
"platform/web/core"
"github.com/shopspring/decimal"
)
// ProductSku 产品SKU表
type ProductSku struct {
core.Model
ProductID int32 `json:"product_id" gorm:"column:product_id"` // 产品ID
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"` // 定价
Discount float32 `json:"discount" gorm:"column:discount"` // 折扣0 - 1 的小数,表示 xx 折
Product *Product `json:"product,omitempty" gorm:"foreignKey:ProductID"`
}