/*
 Navicat Premium Data Transfer

 Source Server         : pet_jisol_cn
 Source Server Type    : MySQL
 Source Server Version : 50734 (5.7.34-log)
 Source Host           : kyu.jisol.cn:3306
 Source Schema         : pet_jisol_cn

 Target Server Type    : MySQL
 Target Server Version : 50734 (5.7.34-log)
 File Encoding         : 65001

 Date: 07/01/2024 17:51:44
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for mode_on_hook
-- ----------------------------
DROP TABLE IF EXISTS `mode_on_hook`;
CREATE TABLE `mode_on_hook`  (
  `player_id` bigint(32) UNSIGNED NOT NULL COMMENT '玩家Id',
  `on_hook_map` bigint(32) UNSIGNED NOT NULL COMMENT '当前玩家所在地图的配置表Id',
  `on_hook_info` json NULL COMMENT '玩家地图信息',
  PRIMARY KEY (`player_id`) USING BTREE,
  UNIQUE INDEX `player_id`(`player_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for player
-- ----------------------------
DROP TABLE IF EXISTS `player`;
CREATE TABLE `player`  (
  `player_id` bigint(32) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '服务器玩家Id',
  `user_id` bigint(32) NOT NULL COMMENT '玩家Id',
  `player_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '玩家名称',
  `player_create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '玩家创建时间',
  `is_novice` tinyint(1) NOT NULL DEFAULT 0 COMMENT '玩家是否过了新手引导',
  PRIMARY KEY (`player_id`) USING BTREE,
  UNIQUE INDEX `user_id`(`user_id`) USING BTREE,
  UNIQUE INDEX `player_id`(`player_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 412 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for player_equip
-- ----------------------------
DROP TABLE IF EXISTS `player_equip`;
CREATE TABLE `player_equip`  (
  `equip_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '装备唯一Id',
  `equip_cfg_id` bigint(20) NOT NULL COMMENT '装备配置表Id',
  `equip_level` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '装备等级',
  `equip_wear` bigint(20) NULL DEFAULT NULL COMMENT '当前装备穿戴的宠物Id',
  `equip_position` bigint(20) NOT NULL COMMENT '装备部位',
  `equip_base_attributes` json NULL COMMENT '装备基础属性',
  `equip_high_attributes` json NULL COMMENT '装备高级属性',
  PRIMARY KEY (`equip_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for player_pet
-- ----------------------------
DROP TABLE IF EXISTS `player_pet`;
CREATE TABLE `player_pet`  (
  `pet_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '宠物唯一Id',
  `pet_player_id` bigint(32) NOT NULL COMMENT '宠物所属的玩家Id',
  `pet_tb_id` bigint(20) UNSIGNED NOT NULL COMMENT '宠物配置表Id',
  `pet_level` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '宠物等级',
  `pet_star` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '宠物星级',
  `pet_star_exp` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '宠物星级经验',
  `version` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新版本号',
  PRIMARY KEY (`pet_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1677 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for player_tactical
-- ----------------------------
DROP TABLE IF EXISTS `player_tactical`;
CREATE TABLE `player_tactical`  (
  `player_id` bigint(32) UNSIGNED NOT NULL COMMENT '服务器玩家Id',
  `tactical_data` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '阵法数据',
  PRIMARY KEY (`player_id`) USING BTREE,
  UNIQUE INDEX `player_id`(`player_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for resource
-- ----------------------------
DROP TABLE IF EXISTS `resource`;
CREATE TABLE `resource`  (
  `resource_id` bigint(32) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '玩家资源Id',
  `player_id` bigint(32) NOT NULL COMMENT '玩家Id',
  `resource_tb_id` bigint(32) NOT NULL COMMENT '玩家资源配置表Id',
  `resource_value` bigint(32) UNSIGNED NOT NULL COMMENT '玩家资源数量',
  `version` bigint(32) UNSIGNED NOT NULL DEFAULT 0 COMMENT '版本号',
  PRIMARY KEY (`resource_id`) USING BTREE,
  UNIQUE INDEX `playerid_resourcetbid`(`player_id`, `resource_tb_id`) USING BTREE COMMENT '玩家的同一个资源是唯一的'
) ENGINE = InnoDB AUTO_INCREMENT = 71 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`  (
  `user_id` bigint(32) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '玩家Id',
  `user_pass` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '玩家密码',
  `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '玩家名称',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 101220 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
