fix:修复 mall product promotion 测试 sql

plp
puhui999 3 years ago
parent 331be53b8b
commit 9517ffdfb8

@ -126,82 +126,32 @@ CREATE TABLE IF NOT EXISTS `product_property_value` (
PRIMARY KEY("id") PRIMARY KEY("id")
) COMMENT ''; ) COMMENT '';
-- TODO @puhui999 DROP TABLE IF EXISTS `product_comment` (
CREATE TABLE IF NOT EXISTS `product_comment` `id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
( `user_id` bigint DEFAULT NULL COMMENT ' MemberUserDO id ',
`id` `user_nickname` varchar(255) DEFAULT NULL COMMENT '',
bigint `user_avatar` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '',
NOT `anonymous` bit(1) DEFAULT NULL COMMENT '',
NULL
AUTO_INCREMENT
COMMENT
'',
`user_id`
bigint
DEFAULT
NULL
COMMENT
' MemberUserDO id ',
`user_nickname`
varchar
(
255
) DEFAULT NULL COMMENT '',
`user_avatar` varchar
(
1024
) DEFAULT NULL COMMENT '',
`anonymous` bit
(
1
) DEFAULT NULL COMMENT '',
`order_id` bigint DEFAULT NULL COMMENT ' TradeOrderDO id ', `order_id` bigint DEFAULT NULL COMMENT ' TradeOrderDO id ',
`order_item_id` bigint DEFAULT NULL COMMENT ' TradeOrderItemDO id ', `order_item_id` bigint DEFAULT NULL COMMENT ' TradeOrderItemDO id ',
`spu_id` bigint DEFAULT NULL COMMENT ' SPU ProductSpuDO id', `spu_id` bigint DEFAULT NULL COMMENT ' SPU ProductSpuDO id',
`spu_name` varchar `spu_name` varchar(255) DEFAULT NULL COMMENT ' SPU ',
(
255
) DEFAULT NULL COMMENT ' SPU ',
`sku_id` bigint DEFAULT NULL COMMENT ' SKU ProductSkuDO id ', `sku_id` bigint DEFAULT NULL COMMENT ' SKU ProductSkuDO id ',
`visible` bit `visible` bit(1) DEFAULT NULL COMMENT 'true:false:',
( `scores` tinyint DEFAULT NULL COMMENT '1-5',
1
) DEFAULT NULL COMMENT 'true:false:',
`scores` tinyint DEFAULT NULL COMMENT '1-5 ',
`description_scores` tinyint DEFAULT NULL COMMENT '1-5 ', `description_scores` tinyint DEFAULT NULL COMMENT '1-5 ',
`benefit_scores` tinyint DEFAULT NULL COMMENT '1-5 ', `benefit_scores` tinyint DEFAULT NULL COMMENT '1-5 ',
`content` varchar `content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '',
( `pic_urls` varchar(4096) DEFAULT NULL COMMENT '',
1024 `reply_status` bit(1) DEFAULT NULL COMMENT '',
) DEFAULT NULL COMMENT '',
`pic_urls` varchar
(
4096
) DEFAULT NULL COMMENT '',
`reply_status` bit
(
1
) DEFAULT NULL COMMENT '',
`reply_user_id` bigint DEFAULT NULL COMMENT ' AdminUserDO id ', `reply_user_id` bigint DEFAULT NULL COMMENT ' AdminUserDO id ',
`reply_content` varchar `reply_content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '',
(
1024
) DEFAULT NULL COMMENT '',
`reply_time` datetime DEFAULT NULL COMMENT '', `reply_time` datetime DEFAULT NULL COMMENT '',
`creator` varchar `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '',
(
64
) DEFAULT '' COMMENT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
`updater` varchar `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '',
(
64
) DEFAULT '' COMMENT '',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
"deleted" bit NOT NULL DEFAULT FALSE, `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
"tenant_id" bigint not null default '0', `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '',
PRIMARY KEY PRIMARY KEY (`id`) USING BTREE
( ) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '';
`id`
)
) COMMENT '';

@ -1,14 +1,7 @@
DELETE DELETE FROM "market_activity";
FROM "market_activity"; DELETE FROM "promotion_coupon_template";
DELETE DELETE FROM "promotion_coupon";
FROM "promotion_coupon_template"; DELETE FROM "promotion_reward_activity";
DELETE DELETE FROM "promotion_discount_activity";
FROM "promotion_coupon"; DELETE FROM "promotion_discount_product";
DELETE DELETE FROM "promotion_seckill_config";
FROM "promotion_reward_activity";
DELETE
FROM "promotion_discount_activity";
DELETE
FROM "promotion_discount_product";
DELETE
FROM "promotion_seckill_config";

@ -107,123 +107,45 @@ CREATE TABLE IF NOT EXISTS "promotion_discount_activity" (
PRIMARY KEY ("id") PRIMARY KEY ("id")
) COMMENT ''; ) COMMENT '';
CREATE TABLE IF NOT EXISTS "promotion_discount_product" ( -- SQL yudao-module-promotion-biz test/resources/sql/create_tables.sql
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, CREATE TABLE IF NOT EXISTS "promotion_seckill_activity" (
"activity_id" bigint NOT NULL, "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"spu_id" bigint NOT NULL, "spu_id" bigint NOT NULL,
"sku_id" bigint NOT NULL, "name" varchar NOT NULL,
"discount_type" int NOT NULL, "status" int NOT NULL,
"discount_percent" "remark" varchar,
int, "start_time" varchar NOT NULL,
"discount_price" "end_time" varchar NOT NULL,
int, "sort" int NOT NULL,
"creator" "config_ids" varchar NOT NULL,
varchar "order_count" int NOT NULL,
DEFAULT "user_count" int NOT NULL,
'', "total_price" int NOT NULL,
"create_time" "total_limit_count" int,
datetime "single_limit_count" int,
NOT "stock" int,
NULL "total_stock" int,
DEFAULT "creator" varchar DEFAULT '',
CURRENT_TIMESTAMP, "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" "updater" varchar DEFAULT '',
varchar "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
DEFAULT "deleted" bit NOT NULL DEFAULT FALSE,
'', "tenant_id" bigint NOT NULL,
"update_time" PRIMARY KEY ("id")
datetime ) COMMENT '';
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_seckill_config"
(
"id"
bigint
NOT
NULL
GENERATED
BY
DEFAULT AS
IDENTITY,
"name"
varchar
NOT
NULL,
"start_time"
varchar
NOT
NULL,
"end_time"
varchar
NOT
NULL,
"seckill_activity_count"
int
NOT
NULL,
"pic_url"
varchar
NOT
NULL,
"status"
varchar
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,
"tenant_id"
bigint
NOT
NULL,
PRIMARY
KEY
(
"id"
)
) COMMENT '';
CREATE TABLE IF NOT EXISTS "promotion_seckill_config" (
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"name" varchar NOT NULL,
"start_time" varchar NOT NULL,
"end_time" varchar NOT NULL,
"pic_url" varchar NOT NULL,
"status" 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,
"tenant_id" bigint NOT NULL,
PRIMARY KEY ("id")
) COMMENT '';

Loading…
Cancel
Save