promotion:增加限时折扣的基础代码

This commit is contained in:
YunaiV
2022-11-05 19:13:43 +08:00
parent 00f90e75d9
commit d4b7f4aaa0
28 changed files with 1139 additions and 113 deletions

View File

@@ -2,3 +2,5 @@ DELETE FROM "market_activity";
DELETE FROM "promotion_coupon_template";
DELETE FROM "promotion_coupon";
DELETE FROM "promotion_reward_activity";
DELETE FROM "promotion_discount_activity";
DELETE FROM "promotion_discount_product";

View File

@@ -91,3 +91,32 @@ CREATE TABLE IF NOT EXISTS "promotion_reward_activity" (
"deleted" bit NOT NULL DEFAULT FALSE,
PRIMARY KEY ("id")
) COMMENT '满减送活动';
CREATE TABLE IF NOT EXISTS "promotion_discount_activity" (
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"name" varchar NOT NULL,
"status" int NOT NULL,
"start_time" datetime NOT NULL,
"end_time" datetime NOT NULL,
"remark" varchar,
"creator" varchar DEFAULT '',
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" varchar DEFAULT '',
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit NOT NULL DEFAULT FALSE,
PRIMARY KEY ("id")
) COMMENT '限时折扣活动';
CREATE TABLE IF NOT EXISTS "promotion_discount_product" (
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"activity_id" bigint NOT NULL,
"spu_id" bigint NOT NULL,
"sku_id" bigint NOT NULL,
"discount_price" int NOT NULL,
"creator" varchar DEFAULT '',
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" varchar DEFAULT '',
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit NOT NULL DEFAULT FALSE,
PRIMARY KEY ("id")
) COMMENT '限时折扣活动';