CREATE DATABASE `yxt_supervise_cyf` /*!40100 DEFAULT CHARACTER SET utf8mb4 */

DROP TABLE IF EXISTS `tank_information`;
CREATE TABLE `tank_information`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
 `number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐编号',
`capacity` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐容量',
`tankPipeline` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐管道',
`crudeSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐所属原油类型',
`inventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐库存',
`initialInventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐初始库存',
`existingInventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐当天现有库存（当天填写）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '油罐信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `crude_oil_type_information`;
CREATE TABLE `crude_oil_type_information`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油名称',
`number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油编号',
`code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油code',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油类型' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

DROP TABLE IF EXISTS `crude_oil_storage`;
CREATE TABLE `crude_oil_storage`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`inventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐库存',
  `initialInventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐初始库存',
  `existingInventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐当天现有库存（当天填写）',
  `contractNumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合同号',
  `supplierSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供货商sid`',
  `contractSigningDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合同签订日期',
  `licensePlateNumber` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发货车牌号',
  `tankSid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐sid',
  `weight` double(255, 0) NULL DEFAULT NULL COMMENT '收料净重',
  `value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收料价值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油入库' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `crude_oil_outbound`;
CREATE TABLE `crude_oil_outbound`  (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`inventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐库存',
  `initialInventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐初始库存',
  `existingInventory` double(100, 0) NULL DEFAULT NULL COMMENT '油罐当天现有库存（当天填写）',
  `salesContractNumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '销售合同号',
  `contractSigningDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签订日期',
  `tankSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '油罐sid',
  `weight` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '净重',
  `value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '价值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油出库记录' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


