mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 05:09:21 +08:00
feat(promotion-fee): 新增推广费类目级归属,区分商品级/类目级/全店比例池
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- ================================================
|
||||
-- ec_promotion_fee:新增 category_id(可空,关联 ec_category)
|
||||
-- 用于类目级推广费;与 product_id 可同时为空表示店铺级按比例分摊
|
||||
-- ================================================
|
||||
|
||||
ALTER TABLE ec_promotion_fee
|
||||
ADD COLUMN `category_id` bigint UNSIGNED NULL DEFAULT NULL COMMENT '类目ID(可选,无商品时可用于类目级推广费)' AFTER `shop_id`;
|
||||
|
||||
ALTER TABLE ec_promotion_fee
|
||||
ADD INDEX `idx_category_id`(`category_id` ASC);
|
||||
|
||||
ALTER TABLE ec_promotion_fee
|
||||
ADD CONSTRAINT `fk_ec_promotion_fee_category`
|
||||
FOREIGN KEY (`category_id`) REFERENCES `ec_category` (`id`)
|
||||
ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user