point_circulation.sql 1.6 KB

1234567891011121314151617181920212223242526
  1. -- ******************************************************************
  2. -- 表 kku_point_circulation 的创建SQL
  3. -- 对应的Model: App\Module\Point\Models\PointCirculationModel
  4. -- 警告: 此文件由系统自动生成,禁止修改!
  5. -- ******************************************************************
  6. CREATE TABLE `kku_point_circulation` (
  7. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增',
  8. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  9. `from_point_id` int(11) NOT NULL DEFAULT '0' COMMENT '源积分类型ID',
  10. `to_point_id` int(11) NOT NULL DEFAULT '0' COMMENT '目标积分类型ID',
  11. `amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '流转积分数量',
  12. `re_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联ID',
  13. `re_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '关联类型',
  14. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '备注',
  15. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-待处理,1-已完成,2-已失败',
  16. `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  17. `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  18. PRIMARY KEY (`id`) USING BTREE,
  19. KEY `idx_user_id` (`user_id`) USING BTREE,
  20. KEY `idx_from_point_id` (`from_point_id`) USING BTREE,
  21. KEY `idx_to_point_id` (`to_point_id`) USING BTREE,
  22. KEY `idx_status` (`status`) USING BTREE,
  23. KEY `idx_create_time` (`create_time`) USING BTREE,
  24. KEY `idx_re_id_type` (`re_id`,`re_type`) USING BTREE
  25. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='积分流转记录表';