/*
 Navicat Premium Dump SQL

 Source Server         : 192.168.18.199(gpfx)
 Source Server Type    : MySQL
 Source Server Version : 90200 (9.2.0)
 Source Host           : 192.168.18.199:3306
 Source Schema         : db_gp_cj

 Target Server Type    : MySQL
 Target Server Version : 90200 (9.2.0)
 File Encoding         : 65001

 Date: 28/09/2025 14:05:57
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for gp_code_all
-- ----------------------------
DROP TABLE IF EXISTS `gp_code_all`;
CREATE TABLE `gp_code_all`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `gp_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `gp_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `gp_code_two` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `gp_code_three` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `market_cap` decimal(20, 2) NULL DEFAULT NULL,
  `mark1` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `mark2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6686 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '所有个股代码-爬取指数用' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gp_day_data
-- ----------------------------
DROP TABLE IF EXISTS `gp_day_data`;
CREATE TABLE `gp_day_data`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `symbol` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '个股代码',
  `timestamp` timestamp NULL DEFAULT NULL COMMENT '时间戳',
  `volume` bigint NULL DEFAULT NULL COMMENT '数量',
  `open` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '开始价',
  `high` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '最高价',
  `low` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '最低价',
  `close` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '结束价',
  `chg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '变化数值',
  `percent` decimal(10, 2) NULL DEFAULT NULL COMMENT '变化百分比',
  `turnoverrate` decimal(10, 2) NULL DEFAULT NULL COMMENT '换手率',
  `amount` bigint NULL DEFAULT NULL COMMENT '成交金额',
  `pb` decimal(10, 2) NULL DEFAULT NULL COMMENT '当前PB',
  `pe` decimal(10, 2) NULL DEFAULT NULL COMMENT '当前PE',
  `ps` decimal(10, 2) NULL DEFAULT NULL COMMENT '当前PS',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `pre_close` decimal(10, 2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_symbol`(`symbol` ASC) USING BTREE,
  INDEX `idx_timestamp`(`timestamp` ASC) USING BTREE,
  INDEX `idx_symbol_time`(`symbol` ASC, `timestamp` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36167913 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gp_gnbk
-- ----------------------------
DROP TABLE IF EXISTS `gp_gnbk`;
CREATE TABLE `gp_gnbk`  (
  `id` bigint NULL DEFAULT NULL,
  `bk_code` bigint NULL DEFAULT NULL,
  `bk_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `gp_code` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `gp_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '概念板块' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gp_hybk
-- ----------------------------
DROP TABLE IF EXISTS `gp_hybk`;
CREATE TABLE `gp_hybk`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `bk_code` bigint NULL DEFAULT NULL,
  `bk_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `gp_code` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `gp_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `Unnamed: 5` double NULL DEFAULT NULL,
  `Unnamed: 6` double NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8331 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '行业板块' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
