-- ****************************************************************** -- 表 kku_shop_promotions 的创建SQL -- 对应的Model: App\Module\Shop\Models\ShopPromotion -- 警告: 此文件由系统自动生成,禁止修改! -- ****************************************************************** CREATE TABLE `kku_shop_promotions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '促销ID,主键', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '促销名称', `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '促销描述', `banner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '促销横幅图片', `discount_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '折扣类型(1:固定折扣, 2:百分比折扣)', `discount_value` int(11) NOT NULL COMMENT '折扣值(固定折扣为具体金额,百分比折扣为1-100的整数)', `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否激活(0:否, 1:是)', `sort_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `start_time` timestamp NULL DEFAULT NULL COMMENT '开始时间', `end_time` timestamp NULL DEFAULT NULL COMMENT '结束时间', `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, KEY `shop_promotions_is_active_index` (`is_active`) USING BTREE, KEY `shop_promotions_sort_order_index` (`sort_order`) USING BTREE, KEY `shop_promotions_start_time_index` (`start_time`) USING BTREE, KEY `shop_promotions_end_time_index` (`end_time`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='商店促销活动表';