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

@ -1,14 +1,7 @@
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";
DELETE
FROM "promotion_seckill_config";
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";
DELETE FROM "promotion_seckill_config";

@ -107,123 +107,45 @@ CREATE TABLE IF NOT EXISTS "promotion_discount_activity" (
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_type" int NOT NULL,
"discount_percent"
int,
"discount_price"
int,
"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_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 '';
-- SQL yudao-module-promotion-biz test/resources/sql/create_tables.sql
CREATE TABLE IF NOT EXISTS "promotion_seckill_activity" (
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"spu_id" bigint NOT NULL,
"name" varchar NOT NULL,
"status" int NOT NULL,
"remark" varchar,
"start_time" varchar NOT NULL,
"end_time" varchar NOT NULL,
"sort" int NOT NULL,
"config_ids" varchar NOT NULL,
"order_count" int NOT NULL,
"user_count" int NOT NULL,
"total_price" int NOT NULL,
"total_limit_count" int,
"single_limit_count" int,
"stock" int,
"total_stock" int,
"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