|
@@ -5583,7 +5583,8 @@ CREATE TABLE IF NOT EXISTS system_prompt_versions (
|
|
|
-- 套餐商品组成明细表(套餐 = 商品 productType=bundle,子商品在 product_bundle_items 中配置)
|
|
-- 套餐商品组成明细表(套餐 = 商品 productType=bundle,子商品在 product_bundle_items 中配置)
|
|
|
CREATE TABLE IF NOT EXISTS product_bundle_items (
|
|
CREATE TABLE IF NOT EXISTS product_bundle_items (
|
|
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
|
|
- bundle_product_id BIGINT NOT NULL COMMENT '套餐商品ID',
|
|
|
|
|
|
|
+ bundle_product_id BIGINT DEFAULT NULL COMMENT '套餐商品ID(定价套餐行置NULL以避免误触发出库联动;出库联动行=$套餐商品ID)',
|
|
|
|
|
+ bundle_sku_id BIGINT DEFAULT NULL COMMENT '套餐SKU锚点:非空=定价套餐行(订单套餐自动定价,套餐价取该SKU.price);空=仅出库联动',
|
|
|
child_product_id BIGINT NOT NULL COMMENT '子商品ID',
|
|
child_product_id BIGINT NOT NULL COMMENT '子商品ID',
|
|
|
child_sku_id BIGINT DEFAULT NULL COMMENT '子SKU ID(为空时直接扣 product.stock)',
|
|
child_sku_id BIGINT DEFAULT NULL COMMENT '子SKU ID(为空时直接扣 product.stock)',
|
|
|
quantity INT NOT NULL DEFAULT 1 COMMENT '子商品数量',
|
|
quantity INT NOT NULL DEFAULT 1 COMMENT '子商品数量',
|