/*
 Navicat Premium Data Transfer

 Source Server         : 御码网控
 Source Server Type    : MySQL
 Source Server Version : 50734
 Source Host           : 124.71.218.7:5000
 Source Schema         : block_chain

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

 Date: 30/09/2021 10:06:04
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for config
-- ----------------------------
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config`  (
  `config_id` int(11) NOT NULL AUTO_INCREMENT,
  `config_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `config_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  `create_time` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`config_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of config
-- ----------------------------
INSERT INTO `config` VALUES (1, 'AdminKey', '-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgLYSHPwnT+7IZftdv\nZqnnfvXiac40HcLo+Z5fzv8FFAGgCgYIKoEcz1UBgi2hRANCAARkKiqjDT0nOG0B\nJWd7Z0BFuaTaxUv9A3nE/5/fRMtRxI4rox/HOqrs9DVlBIvcEuEI4XSaVjicrK4H\nVi5QUbWd\n-----END PRIVATE KEY-----\n', NULL);
INSERT INTO `config` VALUES (2, 'AdminCertificate', '-----BEGIN CERTIFICATE-----\nMIICDzCCAbSgAwIBAgIJAIlCFHqxjopLMAoGCCqBHM9VAYN1MIGQMQswCQYDVQQG\nEwJDTjESMBAGA1UECAwJ5rmW5Y2X55yBMRIwEAYDVQQHDAnplb/mspnluIIxEzAR\nBgNVBAoTCnl1bWF3ay5jb20xDzANBgNVBAsTBlJvb3RDQTEzMDEGA1UEA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saWVudC50bHMu\nc2luYS55dW1hd2suY29tMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEIRTvpY0x\nQiNX0TsGM5OcQMXwWUmnJLzFcwh1bkwHTjZP0JKKpswIgfMfVWodR9v+J4zK8EqR\nE9bBYVKS+FnsfqMCMAAwCgYIKoEcz1UBg3UDRwAwRAIgGsLZMuBdOh3vsIPCdg5B\nVS8rhpVqJek+VPcGdaWJujgCIAoI8T9JoxYrm0JMxwKWSeK+8Wx6/RzdZbFBSVBW\nird9\n-----END CERTIFICATE-----\n', NULL);
INSERT INTO `config` VALUES (4, 'ClientKey', '-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgBC+6/vFjDD3BtYgM\nr4HLr1Yele7ii9nSzGUAdPb5CeCgCgYIKoEcz1UBgi2hRANCAAQhFO+ljTFCI1fR\nOwYzk5xAxfBZSackvMVzCHVuTAdONk/QkoqmzAiB8x9Vah1H2/4njMrwSpET1sFh\nUpL4Wex+\n-----END PRIVATE KEY-----\n', NULL);
INSERT INTO `config` VALUES (5, 'ChainId', 'chain1', NULL);
INSERT INTO `config` VALUES (6, 'NodeAddr', '124.71.218.7:12301', NULL);
INSERT INTO `config` VALUES (7, 'OrgName', 'sina.yumawk.com', NULL);

-- ----------------------------
-- Table structure for consensus
-- ----------------------------
DROP TABLE IF EXISTS `consensus`;
CREATE TABLE `consensus`  (
  `consensus_id` int(11) NOT NULL AUTO_INCREMENT,
  `org_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `node_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `create_time` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`consensus_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for contract
-- ----------------------------
DROP TABLE IF EXISTS `contract`;
CREATE TABLE `contract`  (
  `contract_id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `contract_version` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `create_time` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`contract_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for root
-- ----------------------------
DROP TABLE IF EXISTS `root`;
CREATE TABLE `root`  (
  `root_id` int(11) NOT NULL AUTO_INCREMENT,
  `certificate` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `org_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `create_time` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`root_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of root
-- ----------------------------
INSERT INTO `root` VALUES (1, '-----BEGIN CERTIFICATE-----\nMIICbzCCAhSgAwIBAgIRAPzSShfl3cn+nzsGKH8PJuQwCgYIKoEcz1UBg3UwgZAx\nCzAJBgNVBAYTAkNOMRIwEAYDVQQIDAnmuZbljZfnnIExEjAQBgNVBAcMCemVv+ay\nmeW4gjETMBEGA1UEChMKeXVtYXdrLmNvbTEPMA0GA1UECxMGUm9vdENBMTMwMQYD\nVQQDDCrmuZbljZflvqHnoIHnvZHmjqfkv6Hmga/mioDmnK/mnInpmZDlhazlj7gw\nIBcNMjEwOTEwMDY1MzIwWhgPMjA1MTA5MDMwNjUzMjBaMIGQMQswCQYDVQQGEwJD\nTjESMBAGA1UECAwJ5rmW5Y2X55yBMRIwEAYDVQQHDAnplb/mspnluIIxEzARBgNV\nBAoTCnl1bWF3ay5jb20xDzANBgNVBAsTBlJvb3RDQTEzMDEGA1UEAwwq5rmW5Y2X\n5b6h56CB572R5o6n5L+h5oGv5oqA5pyv5pyJ6ZmQ5YWs5Y+4MFkwEwYHKoZIzj0C\nAQYIKoEcz1UBgi0DQgAEF4jzcDaNk0n9sLM9oU++w04Zw7a26emycMnv688xzSXC\ntCupYeBE+dhbLEhUkaGuOpklo8vIqRaCSLNa/KxINKNLMEkwDgYDVR0PAQH/BAQD\nAgEGMA8GA1UdEwEB/wQFMAMBAf8wJgYDVR0RBB8wHYIKeXVtYXdrLmNvbYIJbG9j\nYWxob3N0hwR/AAABMAoGCCqBHM9VAYN1A0kAMEYCIQCFVCY3xRc+PvCmE94yxM/q\ne+w6cUs3Jf7Zo1IWtKQNhgIhAM7adp2l4f5Zal7Hzj0Bfn64Tc41LrA5w+BfDSnZ\nK+2N\n-----END CERTIFICATE-----\n', 'sina.yumawk.com', '2021-09-27 08:08:09');

SET FOREIGN_KEY_CHECKS = 1;
