
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `T_FUTURES_PARA`
-- ----------------------------
DROP TABLE IF EXISTS `T_FUTURES_PARA`;
CREATE TABLE `T_FUTURES_PARA` (
  `UUID` varchar(32) CHARACTER SET utf8 NOT NULL,
  `SYMBOL` varchar(32) CHARACTER SET utf8 DEFAULT NULL,
  `TIMENUM` int(11) DEFAULT NULL,
  `TIMEUNIT` varchar(32) DEFAULT NULL,
  `UNIT_AMOUNT` double DEFAULT NULL,
  `PROFIT_RATIO` double DEFAULT NULL,
  `UNIT_FEE` double DEFAULT NULL,
  PRIMARY KEY (`UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `T_FUTURES_ORDER`
-- ----------------------------
DROP TABLE IF EXISTS `T_FUTURES_ORDER`;
CREATE TABLE `T_FUTURES_ORDER` (
  `UUID` varchar(32) NOT NULL COMMENT '主键',
  `PARTY_ID` varchar(32) DEFAULT NULL,
  `SYMBOL` varchar(32) DEFAULT NULL COMMENT '代码',
  `ORDER_NO` varchar(64) DEFAULT NULL,
  `DIRECTION` varchar(32) DEFAULT NULL,
  `TIMENUM` int(11) DEFAULT NULL,
  `TIMEUNIT` varchar(64) DEFAULT NULL,
  `UNIT_AMOUNT` double DEFAULT NULL,
  `VOLUME` double DEFAULT NULL,
  `FEE` double DEFAULT NULL,
  `PROFIT_RATIO` double DEFAULT NULL,
  `PROFIT` double DEFAULT NULL,
  `TRADE_AVG_PRICE` double DEFAULT NULL,
  `CLOSE_AVG_PRICE` double DEFAULT NULL,
  `STATE` varchar(32) DEFAULT NULL,
  `CREATE_TIME` datetime DEFAULT NULL,
  `CLOSE_TIME` datetime DEFAULT NULL,
  `SETTLEMENT_TIME` datetime DEFAULT NULL,
  PRIMARY KEY (`UUID`),
  KEY `INDEX_ORDER_STATUS` (`STATE`,`CREATE_TIME`),
  KEY `INDEX_ORDER_ORDER_NO` (`ORDER_NO`),
  KEY `INDEX_ORDER_PARTY_ID` (`PARTY_ID`,`STATE`,`DIRECTION`,`CREATE_TIME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
