CREATE TABLE `promotion_bargain_activity` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '砍价活动编号', `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '砍价活动名称', `spu_id` bigint NOT NULL DEFAULT '0' COMMENT '商品 SPU 编号', `sku_id` bigint NOT NULL COMMENT '商品 SKU 编号', `status` int NOT NULL DEFAULT '0' COMMENT '活动状态', `total_limit_count` int NOT NULL DEFAULT '0' COMMENT '总限购数量', `start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '活动开始时间', `end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '活动结束时间',
`bargain_first_price` int NOT NULL DEFAULT '0' COMMENT '砍价起始价格,单位分', `bargain_min_price` int NOT NULL DEFAULT '0' COMMENT '砍价底价,单位:分', `help_max_count` int NOT NULL DEFAULT '0' COMMENT '砍价人数', `bargain_count` int NOT NULL DEFAULT '0' COMMENT '最大帮砍次数', `random_min_price` int NOT NULL DEFAULT '0' COMMENT '用户每次砍价的最小金额,单位:分', `random_max_price` int NOT NULL DEFAULT '0' COMMENT '用户每次砍价的最大金额,单位:分',
`stock` int NOT NULL DEFAULT '0' COMMENT '砍价库存', `total_stock` int NOT NULL DEFAULT '0' COMMENT '砍价总库存',
`activity_id` bigint NOT NULL COMMENT '砍价活动名称', `spu_id` bigint NOT NULL DEFAULT '0' COMMENT '商品 SPU 编号', `sku_id` bigint NOT NULL COMMENT '商品 SKU 编号', `user_id` bigint NOT NULL COMMENT '用户编号',
`status` int NOT NULL DEFAULT '0' COMMENT '砍价状态', `bargain_first_price` int NOT NULL DEFAULT '0' COMMENT '砍价起始价格,单位:分', `bargain_price` int NOT NULL DEFAULT '0' COMMENT '当前砍价,单位:分', `end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结束时间',