CREATE TABLE `shop_activity_cut_lottery_history` (
                                                     `alh_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '用户中奖编号',
                                                     `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户编号',
                                                     `activity_id` int unsigned NOT NULL DEFAULT '0' COMMENT '活动编号',
                                                     `alh_item_id` int unsigned NOT NULL DEFAULT '0' COMMENT '抽奖物品编号',
                                                     `alh_item_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '抽奖物品名称',
                                                     `alh_award_flag` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否中奖(BOOL):0-未中奖;1-中奖',
                                                     `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                     `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                     PRIMARY KEY (`alh_id`) USING BTREE,
                                                     KEY `activity_id` (`activity_id`) USING BTREE
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='砍价抽奖';

ALTER table shop_activity_cutprice add column `lottery_num` int unsigned NOT NULL DEFAULT '0' COMMENT '次数';
ALTER table shop_activity_cutprice_history add column `lottery_num` int unsigned NOT NULL DEFAULT '0' COMMENT '次数';
ALTER table shop_store_activity_base add column lucky_turn varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '{}' COMMENT '规则配置';

ALTER TABLE shop_activity_cutprice_history add column alh_point int unsigned NOT NULL default 0 COMMENT '骰子点数';
ALTER TABLE shop_activity_cutprice_history add column `ach_price_pre` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '摇骰子前砍掉的价格';