清除数据

This commit is contained in:
2026-05-06 23:30:54 +08:00
parent 17a5734d67
commit d16fc36264
149 changed files with 6691 additions and 5575 deletions

View File

@@ -1,4 +1,4 @@
-- 清理演示过程数据:秒杀活动、秒杀订单、admin 前台订单/拼团/评价/收藏/通知数据
-- 清理演示过程数据:限时活动、限时订单、admin 前台订单/拼团/评价/收藏/通知数据
-- 适用于已导入 flash_sale_db.sql 的 MySQL 数据库。
SET @admin_user_id := (SELECT id

View File

@@ -23,10 +23,10 @@ SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `flash_sales`;
CREATE TABLE `flash_sales`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '秒杀活动ID',
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '限时活动ID',
`product_id` bigint NOT NULL COMMENT '商品ID',
`flash_price` decimal(10, 2) NOT NULL COMMENT '秒杀价格',
`flash_stock` int NOT NULL COMMENT '秒杀库存',
`flash_price` decimal(10, 2) NOT NULL COMMENT '活动价格',
`flash_stock` int NOT NULL COMMENT '活动库存',
`start_time` timestamp NOT NULL COMMENT '开始时间',
`end_time` timestamp NOT NULL COMMENT '结束时间',
`status` tinyint DEFAULT '1' COMMENT '状态1-未开始2-进行中3-已结束',
@@ -42,7 +42,7 @@ CREATE TABLE `flash_sales`
) ENGINE = InnoDB
AUTO_INCREMENT = 13
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_unicode_ci COMMENT ='秒杀活动表';
COLLATE = utf8mb4_unicode_ci COMMENT ='限时活动表';
-- ----------------------------
-- Records of flash_sales
@@ -412,7 +412,7 @@ CREATE TABLE `orders`
`quantity` int NOT NULL DEFAULT '1' COMMENT '购买数量',
`total_price` decimal(10, 2) NOT NULL COMMENT '总价',
`status` tinyint DEFAULT '1' COMMENT '状态1-待支付2-已支付3-已发货4-已完成5-已取消',
`order_type` tinyint DEFAULT '1' COMMENT '订单类型1-普通订单2-秒杀订单',
`order_type` tinyint DEFAULT '1' COMMENT '订单类型1-普通订单2-限时订单',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`completed_at` datetime(6) DEFAULT NULL,