fix:完善商品评论测试 sql
This commit is contained in:
parent
20100aa78b
commit
9ff873fe53
@ -126,36 +126,81 @@ CREATE TABLE IF NOT EXISTS `product_property_value` (
|
||||
PRIMARY KEY("id")
|
||||
) COMMENT '规格值';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `product_comment` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '评价编号',
|
||||
`user_id` bigint NOT NULL COMMENT ' 评价ID 用户编号',
|
||||
`user_nickname` varchar(128) NOT NULL COMMENT '评价人名称',
|
||||
`user_avatar` varchar(255) NOT NULL COMMENT '评价人头像',
|
||||
`anonymous` bit(1) NOT NULL DEFAULT 0 COMMENT '是否匿名 0:不匿名 1:匿名',
|
||||
`order_id` bigint NOT NULL COMMENT '交易订单编号',
|
||||
`order_item_id` bigint NOT NULL COMMENT '交易订单项编号',
|
||||
`spu_id` bigint NOT NULL COMMENT '商品SPU编号',
|
||||
`spu_name` varchar NOT NULL COMMENT '商品SPU名称',
|
||||
`sku_id` bigint NOT NULL COMMENT '商品SKU编号',
|
||||
`visible` bit(1) NOT NULL DEFAULT 1 COMMENT '是否可见 true:显示 false:隐藏',
|
||||
`scores` int NOT NULL COMMENT '评分星级 1-5分',
|
||||
`description_scores` int NOT NULL COMMENT '描述星级 1-5分',
|
||||
`benefit_scores` int NOT NULL COMMENT '服务星级 1-5分',
|
||||
`delivery_scores` int NOT NULL COMMENT '配送星级 1-5分',
|
||||
`content` varchar(2000) NOT NULL COMMENT '评论内容',
|
||||
`pic_urls` varchar(1024) DEFAULT '' COMMENT '评论图片地址数组,以逗号分隔最多上传9张',
|
||||
`replied` bit(1) NOT NULL DEFAULT 0 COMMENT '商家是否回复 1:回复 0:未回复',
|
||||
`reply_user_id` bigint COMMENT '回复管理员编号',
|
||||
`reply_content` varchar(2000) COMMENT '商家回复内容',
|
||||
`reply_time` datetime COMMENT '商家回复时间',
|
||||
`additional_content` varchar(2000) COMMENT '追加评价内容',
|
||||
`additional_pic_urls` varchar(1024) COMMENT '追评评价图片地址数组,以逗号分隔最多上传9张',
|
||||
`additional_time` datetime COMMENT '追加评价时间',
|
||||
"creator" varchar(64) DEFAULT '',
|
||||
"create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updater" varchar(64) DEFAULT '',
|
||||
"update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
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 '是否匿名',
|
||||
`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 名称',
|
||||
`sku_id` bigint DEFAULT NULL COMMENT '商品 SKU 编号关联 ProductSkuDO 的 id 编号',
|
||||
`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 '商家是否回复',
|
||||
`reply_user_id` bigint DEFAULT NULL COMMENT '回复管理员编号关联 AdminUserDO 的 id 编号',
|
||||
`reply_content` varchar
|
||||
(
|
||||
1024
|
||||
) DEFAULT NULL COMMENT '商家回复内容',
|
||||
`reply_time` datetime DEFAULT NULL COMMENT '商家回复时间',
|
||||
`creator` varchar
|
||||
(
|
||||
64
|
||||
) DEFAULT '' COMMENT '创建者',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`updater` varchar
|
||||
(
|
||||
64
|
||||
) 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 '商品评价';
|
||||
"tenant_id" bigint not null default '0',
|
||||
PRIMARY KEY
|
||||
(
|
||||
`id`
|
||||
)
|
||||
) COMMENT '产品评论表';
|
||||
|
Loading…
Reference in New Issue
Block a user