-- --------------------------------------------------------
-- 主机:                           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.position_pool 结构
CREATE TABLE IF NOT EXISTS `position_pool` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '股票名字',
  `code` varchar(50) DEFAULT NULL COMMENT '股票代号',
  `time_in` varchar(50) DEFAULT NULL COMMENT '入池时间',
  `price_in` double DEFAULT NULL COMMENT '入池价格',
  `time_buy` varchar(50) DEFAULT '0' COMMENT '购买时间',
  `price_buy` double DEFAULT '0' COMMENT '购买价格',
  `time_sale` varchar(50) DEFAULT '0' COMMENT '卖出时间',
  `price_sale` double DEFAULT '0' COMMENT '卖出价格',
  `rate_in` double DEFAULT '0' COMMENT '入池收益',
  `rate_buy` double DEFAULT '0' COMMENT '买入收益',
  `rate_sale` double DEFAULT '0' COMMENT '卖出收益',
  `type` varchar(50) DEFAULT NULL COMMENT '1=短线，2=中线，3=长线',
  `state` int(11) DEFAULT '1' COMMENT '1=观察，2=持有，3=卖出',
  `cur_price` double DEFAULT '0' COMMENT '当前价格',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='股票持仓池';

-- 正在导出表  stock_plan.position_pool 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `position_pool` DISABLE KEYS */;
INSERT INTO `position_pool` (`id`, `name`, `code`, `time_in`, `price_in`, `time_buy`, `price_buy`, `time_sale`, `price_sale`, `rate_in`, `rate_buy`, `rate_sale`, `type`, `state`, `cur_price`) VALUES
	(1, '宁德时代', 'SZ300750', '2025-10-29 21:22:49', 400, '2025-10-29 23:39:32', 400, '0', 0, 0, 0, 0, '中线', 1, 500),
	(2, '阳光电源', 'SZ300274', '2025-10-29 21:25:30', 191.49, '0', 0, '0', 0, 0, 0, 0, '长线', 1, 191.49),
	(3, '先导智能', 'SZ300450', '2025-10-29 21:26:58', 62.75, '0', 0, '0', 0, 0, 0, 0, '短线', 1, 162.75),
	(4, '胜宏科技', 'SZ300476', '2025-10-29 23:43:40', 339, '0', 0, '0', 0, 0, 0, 0, '短线', 1, 339),
	(5, '立讯精密', 'SZ002475', '2025-10-29 23:46:50', 67.28, '2025-10-29 23:50:44', 67.28, '2025-10-30 00:08:37', 167.28, 0, 0, 148.633, '中线', 3, 167.28),
	(6, '特变电工', 'SH600089', '2025-10-29 23:47:14', 20.9, '2025-10-29 23:48:41', 20.9, '2025-10-30 00:07:53', 120.9, 0, 0, 478.469, '长线', 3, 120.9);
/*!40000 ALTER TABLE `position_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 */;
