/*
 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 `account_book`;
CREATE TABLE `account_book`  (
  `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 '交易日期',
  `operate` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '操作',
  `deal_price` decimal(50, 2) NULL DEFAULT NULL COMMENT '交易价格',
  `volumn` decimal(50, 0) NULL DEFAULT NULL COMMENT '成交量',
  `amount` decimal(50, 2) NULL DEFAULT NULL COMMENT '成交额',
  `tax` decimal(50, 2) NULL DEFAULT NULL COMMENT '印花税',
  `fee` decimal(50, 2) NULL DEFAULT NULL COMMENT '手续费',
  `other` decimal(50, 2) NULL DEFAULT NULL COMMENT '其他费用',
  `pre_id` double NULL DEFAULT NULL COMMENT '关联操作id',
  `user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
  `deal_logic` 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;
