| 123456789101112131415161718192021222324252627 |
- -- ******************************************************************
- -- 表 kku_point_order 的创建SQL
- -- 对应的Model: App\Module\Point\Models\PointOrderModel
- -- 警告: 此文件由系统自动生成,禁止修改!
- -- ******************************************************************
- CREATE TABLE `kku_point_order` (
- `id` int NOT NULL AUTO_INCREMENT COMMENT '自增',
- `order_no` varchar(50) NOT NULL DEFAULT '' COMMENT '订单号',
- `user_id` int NOT NULL DEFAULT '0' COMMENT '用户ID',
- `point_id` int NOT NULL DEFAULT '0' COMMENT '积分类型ID',
- `amount` bigint NOT NULL DEFAULT '0' COMMENT '积分数量',
- `order_type` varchar(50) NOT NULL DEFAULT '' COMMENT '订单类型',
- `title` varchar(200) NOT NULL DEFAULT '' COMMENT '订单标题',
- `description` varchar(500) NOT NULL DEFAULT '' COMMENT '订单描述',
- `status` tinyint NOT NULL DEFAULT '0' COMMENT '订单状态',
- `extra_data` text COMMENT '额外数据(JSON格式)',
- `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
- `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `uk_order_no` (`order_no`),
- KEY `idx_user_id` (`user_id`),
- KEY `idx_point_id` (`point_id`),
- KEY `idx_order_type` (`order_type`),
- KEY `idx_status` (`status`),
- KEY `idx_create_time` (`create_time`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='积分订单表';
|