point.sql 1.0 KB

1234567891011121314151617181920
  1. -- ******************************************************************
  2. -- 表 kku_point 的创建SQL
  3. -- 对应的Model: App\Module\Point\Models\PointModel
  4. -- 警告: 此文件由系统自动生成,禁止修改!
  5. -- ******************************************************************
  6. CREATE TABLE `kku_point` (
  7. `id` int NOT NULL AUTO_INCREMENT COMMENT '自增',
  8. `user_id` int NOT NULL DEFAULT '0' COMMENT '用户ID',
  9. `point_id` int NOT NULL DEFAULT '0' COMMENT '积分类型ID',
  10. `balance` bigint NOT NULL DEFAULT '0' COMMENT '积分余额(整数)',
  11. `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  12. `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  13. PRIMARY KEY (`id`) USING BTREE,
  14. UNIQUE KEY `uk_user_point` (`user_id`,`point_id`) USING BTREE,
  15. KEY `idx_user_id` (`user_id`) USING BTREE,
  16. KEY `idx_point_id` (`point_id`) USING BTREE,
  17. KEY `idx_balance` (`balance`) USING BTREE,
  18. KEY `idx_update_time` (`update_time`) USING BTREE
  19. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户积分表';