/*
 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_total`;
CREATE TABLE `statistics_total`  (
  `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 '股票名称',
  `start_trade_day` date NULL DEFAULT NULL COMMENT '建仓交易日期',
  `end_trade_day` date NULL DEFAULT NULL COMMENT '清仓交易日星期',
  `total_profit` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏',
  `total_diff` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏比例',
  `start_price` decimal(50, 2) NULL DEFAULT NULL COMMENT '建仓交易价格',
  `end_price` decimal(50, 2) NULL DEFAULT NULL COMMENT '建仓交易价格',
  `volumn_total` decimal(50, 0) NULL DEFAULT NULL COMMENT '总成交量',
  `amount_total` decimal(50, 2) NULL DEFAULT NULL COMMENT '总成交额',
  `operate_times` decimal(50, 2) NULL DEFAULT NULL COMMENT '交易次数',
  `fee` decimal(50, 2) NULL DEFAULT NULL COMMENT '总手续费',
  `tax` decimal(50, 2) NULL DEFAULT NULL COMMENT '总印花税',
  `other` 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;