-- --------------------------------------------------------
-- 主机:                           127.0.0.1
-- 服务器版本:                        5.6.35-log - MySQL Community Server (GPL)
-- 服务器操作系统:                      Win64
-- HeidiSQL 版本:                  9.5.0.5196
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


-- 导出 stock_plan 的数据库结构
CREATE DATABASE IF NOT EXISTS `stock_plan` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `stock_plan`;

-- 导出  表 stock_plan.days_info 结构
CREATE TABLE IF NOT EXISTS `days_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `log_time` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='记录每次更新的时间节点，主要是为了方便后续的节点';

-- 正在导出表  stock_plan.days_info 的数据：~6 rows (大约)
/*!40000 ALTER TABLE `days_info` DISABLE KEYS */;
INSERT INTO `days_info` (`id`, `log_time`) VALUES
	(1, '2025-02-12'),
	(2, '2025-02-10'),
	(3, '2025-02-09'),
	(4, '2025-02-08'),
	(5, '2025-02-11'),
	(6, '2025-02-26'),
	(7, '2025-02-27'),
	(8, '2025-02-28');
/*!40000 ALTER TABLE `days_info` ENABLE KEYS */;

-- 导出  表 stock_plan.stock_pool 结构
CREATE TABLE IF NOT EXISTS `stock_pool` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '股票名',
  `code` varchar(50) DEFAULT NULL COMMENT '股票代号',
  `in_price` double DEFAULT NULL COMMENT '列入监控的价格',
  `in_time` varchar(50) DEFAULT NULL COMMENT '列入监控的时间',
  `cur_price` double DEFAULT NULL COMMENT '当前收盘价',
  `percent` double DEFAULT NULL COMMENT '盈亏百分比',
  `out_price` double DEFAULT NULL COMMENT '卖出的价格',
  `out_time` varchar(50) DEFAULT NULL COMMENT '卖出的时间',
  `type` varchar(50) NOT NULL DEFAULT 'week' COMMENT '周期类型，day，week,month,quarter,year',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '状态 1=监测中，2=监测结束',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='股票池，用于监听';

-- 正在导出表  stock_plan.stock_pool 的数据：~6 rows (大约)
/*!40000 ALTER TABLE `stock_pool` DISABLE KEYS */;
INSERT INTO `stock_pool` (`id`, `name`, `code`, `in_price`, `in_time`, `cur_price`, `percent`, `out_price`, `out_time`, `type`, `state`) VALUES
	(1, '龙韵股份', 'SH603729', 15.91, '2000-01-01', 15.5, -2.5769956002514194, NULL, NULL, 'week', 1),
	(2, '龙腾光电', 'SH688055', 3.78, '2025-02-26', 3.88, 2.645502645502651, 3.88, '2025-02-26', 'month', 1),
	(3, '深桑达A', 'SZ000032', 29.25, '2025-02-27', 26.33, -9.982905982905987, NULL, NULL, 'month', 1),
	(4, '航锦科技', 'SZ000818', 32.7, '2025-02-27', 31.45, -3.822629969418967, NULL, NULL, 'month', 1),
	(5, '深信服', 'SZ300454', 109.9, '2025-02-27', 102.06, -7.133757961783438, NULL, NULL, 'month', 1),
	(6, '卫宁健康', 'SZ300253', 11.87, '2025-02-27', 11.03, -7.076663858466725, NULL, NULL, 'month', 1);
/*!40000 ALTER TABLE `stock_pool` ENABLE KEYS */;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
