/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80022
 Source Host           : localhost:3306
 Source Schema         : ry

 Target Server Type    : MySQL
 Target Server Version : 80022
 File Encoding         : 65001

 Date: 07/04/2022 13:49:59
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for account_book 统计表当日持仓，包含当日清仓；清仓时统计，查询时统计，盘后统计；为当前持仓股
-- ----------------------------
DROP TABLE IF EXISTS `statistics_remain`;
CREATE TABLE `statistics_remain`  (
  `id` double NOT NULL AUTO_INCREMENT,
  `code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
  `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '股票名称',
  `trade_day` date NULL DEFAULT NULL COMMENT '交易日期',
  `week_day` date NULL DEFAULT NULL COMMENT '交易日星期',
  `total_profit` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏',
  `total_diff` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏比例',
  `total_diff_overall` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏占整体盈亏比例',
  `remaining` decimal(50, 2) NULL DEFAULT NULL COMMENT '剩余数量',
  `user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
  `bz` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '统计表当日持仓' ROW_FORMAT = DYNAMIC;


SET FOREIGN_KEY_CHECKS = 1;