diff --git a/Backend/App_Data/BIMS_Mitsubishi_v01.ndm2 b/Backend/App_Data/BIMS_Mitsubishi_v01.ndm2 new file mode 100644 index 0000000..6934d81 --- /dev/null +++ b/Backend/App_Data/BIMS_Mitsubishi_v01.ndm2 @@ -0,0 +1,18188 @@ +{ + "paper": { + "name": "A4", + "leftMargin": 0.5, + "rightMargin": 0.5, + "topMargin": 0.5, + "bottomMargin": 0.5, + "isPortriat": true + }, + "modelVersion": 2.01, + "defaultSchema": "Default", + "server": { + "objectType": "Server_MYSQL", + "name": "Default", + "serverVersion": 80017, + "edition": "Default", + "lowerCaseTableNames": 0, + "schemas": [ + { + "objectType": "Schema_MYSQL", + "name": "Default", + "tables": [], + "views": [] + }, + { + "objectType": "Schema_MYSQL", + "name": "bims_mitsubishi", + "tables": [ + { + "objectType": "Table_MYSQL", + "name": "alarmOrion_OrionAlarmClass", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 4, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "alarmOrion_OrionAlarmClass", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:32:53", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 16384, + "maxDataLength": 0, + "rows": 3, + "updateTime": "2022-10-20 07:38:56", + "DDL": "CREATE TABLE `alarmOrion_OrionAlarmClass` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `alarmClass` varchar(64) NOT NULL,\n `unackedAlarmCount` int(11) DEFAULT NULL,\n `openAlarmCount` int(11) DEFAULT NULL,\n `inAlarmCount` int(11) DEFAULT NULL,\n `totalAlarmCount` int(11) DEFAULT NULL,\n `timeOfLastAlarm` bigint(20) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `alarmOrion_OrionAlarmClassalarmClassUQ` (`alarmClass`)\n) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "alarmClass", + "type": "varchar", + "length": 64, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "alarmClass" + }, + { + "objectType": "TableField_MYSQL", + "name": "unackedAlarmCount", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "unackedAlarmCount" + }, + { + "objectType": "TableField_MYSQL", + "name": "openAlarmCount", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "openAlarmCount" + }, + { + "objectType": "TableField_MYSQL", + "name": "inAlarmCount", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "inAlarmCount" + }, + { + "objectType": "TableField_MYSQL", + "name": "totalAlarmCount", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "totalAlarmCount" + }, + { + "objectType": "TableField_MYSQL", + "name": "timeOfLastAlarm", + "type": "bigint", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "timeOfLastAlarm" + } + ], + "indexes": [ + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmClassalarmClassUQ", + "type": "UNIQUE", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmClassalarmClassUQ", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "2", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "alarmClass", + "keyLength": 0, + "order": "", + "oldName": "alarmClass" + } + ] + } + ], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "alarmOrion_OrionAlarmFacetName", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 16, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "alarmOrion_OrionAlarmFacetName", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:32:53", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 16384, + "maxDataLength": 0, + "rows": 14, + "updateTime": "2022-10-19 10:40:11", + "DDL": "CREATE TABLE `alarmOrion_OrionAlarmFacetName` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `facetName` varchar(128) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `alarmOrion_OrionAlarmFacetNamefacetNameUQ` (`facetName`)\n) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "facetName", + "type": "varchar", + "length": 128, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "facetName" + } + ], + "indexes": [ + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmFacetNamefacetNameUQ", + "type": "UNIQUE", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmFacetNamefacetNameUQ", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "12", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "facetName", + "keyLength": 0, + "order": "", + "oldName": "facetName" + } + ] + } + ], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "alarmOrion_OrionAlarmFacetValue", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 2087, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "alarmOrion_OrionAlarmFacetValue", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:32:53", + "checkTime": "", + "dataFree": 0, + "dataLength": 131072, + "indexLength": 180224, + "maxDataLength": 0, + "rows": 2086, + "updateTime": "2022-10-20 07:38:56", + "DDL": "CREATE TABLE `alarmOrion_OrionAlarmFacetValue` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `alarm` int(11) DEFAULT NULL,\n `facetName` int(11) DEFAULT NULL,\n `value` varchar(512) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `alarmOrion_OrionAlarmFacetValuealarmFK` (`alarm`),\n KEY `alarmOrion_OrionAlarmFacetValuefacetNameFK` (`facetName`),\n KEY `alarmOrion_OrionAlarmFacetValuealarm` (`alarm` DESC),\n CONSTRAINT `alarmOrion_OrionAlarmFacetValuealarmFK` FOREIGN KEY (`alarm`) REFERENCES `alarmOrion_OrionAlarmRecord` (`id`) ON DELETE CASCADE,\n CONSTRAINT `alarmOrion_OrionAlarmFacetValuefacetNameFK` FOREIGN KEY (`facetName`) REFERENCES `alarmOrion_OrionAlarmFacetName` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2111 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "alarm", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "alarm" + }, + { + "objectType": "TableField_MYSQL", + "name": "facetName", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "facetName" + }, + { + "objectType": "TableField_MYSQL", + "name": "value", + "type": "varchar", + "length": 512, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "value" + } + ], + "indexes": [ + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmFacetValuealarmFK", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmFacetValuealarmFK", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "154", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "alarm", + "keyLength": 0, + "order": "", + "oldName": "alarm" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmFacetValuefacetNameFK", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmFacetValuefacetNameFK", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "15", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "facetName", + "keyLength": 0, + "order": "", + "oldName": "facetName" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmFacetValuealarm", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmFacetValuealarm", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "D", + "cardinality": "154", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "alarm", + "keyLength": 0, + "order": "", + "oldName": "alarm" + } + ] + } + ], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [ + { + "objectType": "ForeignKey_MYSQL", + "name": "alarmOrion_OrionAlarmFacetValuealarmFK", + "fields": [ + "alarm" + ], + "referenceSchema": "bims_mitsubishi", + "referenceTable": "alarmOrion_OrionAlarmRecord", + "referenceFields": [ + "id" + ], + "onDelete": "CASCADE", + "onUpdate": "RESTRICT", + "sourceCardinality": "ZeroOrManyRelationship", + "targetCardinality": "ZeroOrOneRelationship", + "oldName": "alarmOrion_OrionAlarmFacetValuealarmFK" + }, + { + "objectType": "ForeignKey_MYSQL", + "name": "alarmOrion_OrionAlarmFacetValuefacetNameFK", + "fields": [ + "facetName" + ], + "referenceSchema": "bims_mitsubishi", + "referenceTable": "alarmOrion_OrionAlarmFacetName", + "referenceFields": [ + "id" + ], + "onDelete": "CASCADE", + "onUpdate": "RESTRICT", + "sourceCardinality": "ZeroOrManyRelationship", + "targetCardinality": "ZeroOrOneRelationship", + "oldName": "alarmOrion_OrionAlarmFacetValuefacetNameFK" + } + ], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "alarmOrion_OrionAlarmRecord", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 167, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "alarmOrion_OrionAlarmRecord", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:32:53", + "checkTime": "", + "dataFree": 0, + "dataLength": 49152, + "indexLength": 81920, + "maxDataLength": 0, + "rows": 166, + "updateTime": "2022-10-20 07:38:56", + "DDL": "CREATE TABLE `alarmOrion_OrionAlarmRecord` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `timestamp` bigint(20) DEFAULT NULL,\n `datestamp` date DEFAULT NULL,\n `uuidHash` int(11) DEFAULT NULL,\n `uuid` binary(16) DEFAULT NULL,\n `isOpen` tinyint(4) DEFAULT NULL,\n `sourceState` int(11) DEFAULT NULL,\n `ackState` int(11) DEFAULT NULL,\n `ackRequired` tinyint(4) DEFAULT NULL,\n `alarmClass` int(11) DEFAULT NULL,\n `priority` int(11) DEFAULT NULL,\n `normalTime` bigint(20) DEFAULT NULL,\n `ackTime` bigint(20) DEFAULT NULL,\n `userAccount` varchar(32) DEFAULT NULL,\n `alarmTransition` int(11) DEFAULT NULL,\n `lastUpdate` bigint(20) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `alarmOrion_OrionAlarmRecordalarmClassFK` (`alarmClass`),\n KEY `alarmOrion_OrionAlarmRecorddatestamp` (`datestamp`),\n KEY `alarmOrion_OrionAlarmRecorduuidHash` (`uuidHash`),\n KEY `alarmOrion_OrionAlarmRecordsourceState` (`sourceState`),\n KEY `alarmOrion_OrionAlarmRecordackState` (`ackState`),\n CONSTRAINT `alarmOrion_OrionAlarmRecordalarmClassFK` FOREIGN KEY (`alarmClass`) REFERENCES `alarmOrion_OrionAlarmClass` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=169 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "timestamp", + "type": "bigint", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "timestamp" + }, + { + "objectType": "TableField_MYSQL", + "name": "datestamp", + "type": "date", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "datestamp" + }, + { + "objectType": "TableField_MYSQL", + "name": "uuidHash", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "uuidHash" + }, + { + "objectType": "TableField_MYSQL", + "name": "uuid", + "type": "binary", + "length": 16, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "uuid" + }, + { + "objectType": "TableField_MYSQL", + "name": "isOpen", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "isOpen" + }, + { + "objectType": "TableField_MYSQL", + "name": "sourceState", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sourceState" + }, + { + "objectType": "TableField_MYSQL", + "name": "ackState", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ackState" + }, + { + "objectType": "TableField_MYSQL", + "name": "ackRequired", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ackRequired" + }, + { + "objectType": "TableField_MYSQL", + "name": "alarmClass", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "alarmClass" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "normalTime", + "type": "bigint", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "normalTime" + }, + { + "objectType": "TableField_MYSQL", + "name": "ackTime", + "type": "bigint", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ackTime" + }, + { + "objectType": "TableField_MYSQL", + "name": "userAccount", + "type": "varchar", + "length": 32, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "userAccount" + }, + { + "objectType": "TableField_MYSQL", + "name": "alarmTransition", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "alarmTransition" + }, + { + "objectType": "TableField_MYSQL", + "name": "lastUpdate", + "type": "bigint", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "lastUpdate" + } + ], + "indexes": [ + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmRecordalarmClassFK", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmRecordalarmClassFK", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "3", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "alarmClass", + "keyLength": 0, + "order": "", + "oldName": "alarmClass" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmRecorddatestamp", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmRecorddatestamp", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "8", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "datestamp", + "keyLength": 0, + "order": "", + "oldName": "datestamp" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmRecorduuidHash", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmRecorduuidHash", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "162", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "uuidHash", + "keyLength": 0, + "order": "", + "oldName": "uuidHash" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmRecordsourceState", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmRecordsourceState", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "2", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "sourceState", + "keyLength": 0, + "order": "", + "oldName": "sourceState" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmRecordackState", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmRecordackState", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "2", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "ackState", + "keyLength": 0, + "order": "", + "oldName": "ackState" + } + ] + } + ], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [ + { + "objectType": "ForeignKey_MYSQL", + "name": "alarmOrion_OrionAlarmRecordalarmClassFK", + "fields": [ + "alarmClass" + ], + "referenceSchema": "bims_mitsubishi", + "referenceTable": "alarmOrion_OrionAlarmClass", + "referenceFields": [ + "id" + ], + "onDelete": "CASCADE", + "onUpdate": "RESTRICT", + "sourceCardinality": "ZeroOrManyRelationship", + "targetCardinality": "ZeroOrOneRelationship", + "oldName": "alarmOrion_OrionAlarmRecordalarmClassFK" + } + ], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "alarmOrion_OrionAlarmSource", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 7, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "alarmOrion_OrionAlarmSource", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:32:53", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 16384, + "maxDataLength": 0, + "rows": 6, + "updateTime": "2022-10-19 10:40:10", + "DDL": "CREATE TABLE `alarmOrion_OrionAlarmSource` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `source` varchar(255) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `alarmOrion_OrionAlarmSourcesourceUQ` (`source`)\n) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "source", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "source" + } + ], + "indexes": [ + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmSourcesourceUQ", + "type": "UNIQUE", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmSourcesourceUQ", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "6", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "source", + "keyLength": 0, + "order": "", + "oldName": "source" + } + ] + } + ], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "alarmOrion_OrionAlarmSourceOrder", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 167, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "alarmOrion_OrionAlarmSourceOrder", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:32:53", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 49152, + "maxDataLength": 0, + "rows": 166, + "updateTime": "2022-10-20 07:38:56", + "DDL": "CREATE TABLE `alarmOrion_OrionAlarmSourceOrder` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `alarm` int(11) DEFAULT NULL,\n `alarmSource` int(11) DEFAULT NULL,\n `sourceOrder` int(11) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `alarmOrion_OrionAlarmSourceOrderalarmFK` (`alarm`),\n KEY `alarmOrion_OrionAlarmSourceOrderalarmSourceFK` (`alarmSource`),\n KEY `alarmOrion_OrionAlarmSourceOrderalarm` (`alarm` DESC),\n CONSTRAINT `alarmOrion_OrionAlarmSourceOrderalarmFK` FOREIGN KEY (`alarm`) REFERENCES `alarmOrion_OrionAlarmRecord` (`id`) ON DELETE CASCADE,\n CONSTRAINT `alarmOrion_OrionAlarmSourceOrderalarmSourceFK` FOREIGN KEY (`alarmSource`) REFERENCES `alarmOrion_OrionAlarmSource` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=169 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "alarm", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "alarm" + }, + { + "objectType": "TableField_MYSQL", + "name": "alarmSource", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "alarmSource" + }, + { + "objectType": "TableField_MYSQL", + "name": "sourceOrder", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sourceOrder" + } + ], + "indexes": [ + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmSourceOrderalarmFK", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmSourceOrderalarmFK", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "152", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "alarm", + "keyLength": 0, + "order": "", + "oldName": "alarm" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmSourceOrderalarmSourceFK", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmSourceOrderalarmSourceFK", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "6", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "alarmSource", + "keyLength": 0, + "order": "", + "oldName": "alarmSource" + } + ] + }, + { + "objectType": "Index_MYSQL", + "name": "alarmOrion_OrionAlarmSourceOrderalarm", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "alarmOrion_OrionAlarmSourceOrderalarm", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "D", + "cardinality": "152", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "alarm", + "keyLength": 0, + "order": "", + "oldName": "alarm" + } + ] + } + ], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [ + { + "objectType": "ForeignKey_MYSQL", + "name": "alarmOrion_OrionAlarmSourceOrderalarmFK", + "fields": [ + "alarm" + ], + "referenceSchema": "bims_mitsubishi", + "referenceTable": "alarmOrion_OrionAlarmRecord", + "referenceFields": [ + "id" + ], + "onDelete": "CASCADE", + "onUpdate": "RESTRICT", + "sourceCardinality": "ZeroOrManyRelationship", + "targetCardinality": "ZeroOrOneRelationship", + "oldName": "alarmOrion_OrionAlarmSourceOrderalarmFK" + }, + { + "objectType": "ForeignKey_MYSQL", + "name": "alarmOrion_OrionAlarmSourceOrderalarmSourceFK", + "fields": [ + "alarmSource" + ], + "referenceSchema": "bims_mitsubishi", + "referenceTable": "alarmOrion_OrionAlarmSource", + "referenceFields": [ + "id" + ], + "onDelete": "CASCADE", + "onUpdate": "RESTRICT", + "sourceCardinality": "ZeroOrManyRelationship", + "targetCardinality": "ZeroOrOneRelationship", + "oldName": "alarmOrion_OrionAlarmSourceOrderalarmSourceFK" + } + ], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "auth_page", + "comment": "頁面授權", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "auth_page", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-21 02:03:10", + "checkTime": "", + "dataFree": 0, + "dataLength": 65536, + "indexLength": 0, + "maxDataLength": 0, + "rows": 224, + "updateTime": "", + "DDL": "CREATE TABLE `auth_page` (\n `AuthCode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '授權代碼',\n `AuthType` tinyint(4) DEFAULT NULL COMMENT '類型 1:前台 2:後台',\n `MainName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '大項名稱',\n `SubName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '功能名稱',\n `building_guid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '大樓GUID',\n `building_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '大樓tag',\n `ShowView` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '檢視資訊',\n `OldShowView` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '舊檢視資訊',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n PRIMARY KEY (`AuthCode`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='頁面授權'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "AuthCode", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "授權代碼", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "AuthCode" + }, + { + "objectType": "TableField_MYSQL", + "name": "AuthType", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "類型 1:前台 2:後台", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "AuthType" + }, + { + "objectType": "TableField_MYSQL", + "name": "MainName", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "大項名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "MainName" + }, + { + "objectType": "TableField_MYSQL", + "name": "SubName", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "功能名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "SubName" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "大樓GUID", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "大樓tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "ShowView", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "檢視資訊", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ShowView" + }, + { + "objectType": "TableField_MYSQL", + "name": "OldShowView", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "舊檢視資訊", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "OldShowView" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "AuthCode", + "keyLength": 0, + "order": "", + "oldName": "AuthCode" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "building_menu_bak", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "building_menu_bak", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-19 05:39:48", + "checkTime": "", + "dataFree": 0, + "dataLength": 98304, + "indexLength": 0, + "maxDataLength": 0, + "rows": 208, + "updateTime": "", + "DDL": "CREATE TABLE `building_menu_bak` (\n `building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '棟別tag',\n `main_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統大類tag',\n `sub_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統小類tag',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '棟別guid',\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統大類guid',\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統小類guid',\n `drawing` tinyint(4) DEFAULT NULL COMMENT '預設頁面 4:昇位圖, 2:系統圖, 1:樓層平面圖, 3:彈出URL, 5:3D圖',\n `icon_click` tinyint(4) DEFAULT '0' COMMENT '昇位/平面圖 icon click 開關 0:URL 1:開關',\n `icon_click_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '昇位/平面圖 icon click URL',\n `icon_click_url_width` int(11) DEFAULT '0' COMMENT '昇位圖 彈出視窗寬度',\n `icon_click_url_height` int(11) DEFAULT '0' COMMENT '昇位圖 彈出視窗高度',\n `planimetric_click` tinyint(4) DEFAULT '0' COMMENT '是否顯示平面圖 1:開 0:關\\r',\n `planimetric_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '平面圖選擇樓層',\n `system_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統圖 URL\\r',\n `riser_diagram_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '昇位圖URL',\n `device_building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備棟別標籤',\n `device_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備系統標籤',\n `OpenTab` smallint(6) DEFAULT NULL COMMENT '0 開在自己的熒幕, 1 開第一個熒幕, 2 開第二個熒幕',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間'\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "drawing", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "預設頁面 4:昇位圖, 2:系統圖, 1:樓層平面圖, 3:彈出URL, 5:3D圖", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "drawing" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位/平面圖 icon click 開關 0:URL 1:開關", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click_url", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位/平面圖 icon click URL", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click_url" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click_url_width", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位圖 彈出視窗寬度", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click_url_width" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click_url_height", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位圖 彈出視窗高度", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click_url_height" + }, + { + "objectType": "TableField_MYSQL", + "name": "planimetric_click", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否顯示平面圖 1:開 0:關\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "planimetric_click" + }, + { + "objectType": "TableField_MYSQL", + "name": "planimetric_floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "平面圖選擇樓層", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "planimetric_floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_url", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統圖 URL\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_url" + }, + { + "objectType": "TableField_MYSQL", + "name": "riser_diagram_url", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位圖URL", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "riser_diagram_url" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備棟別標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備系統標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "OpenTab", + "type": "smallint", + "length": 6, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "0 開在自己的熒幕, 1 開第一個熒幕, 2 開第二個熒幕", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "OpenTab" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "data_delivery_log", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 9, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "data_delivery_log", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:54", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 16384, + "maxDataLength": 0, + "rows": 8, + "updateTime": "", + "DDL": "CREATE TABLE `data_delivery_log` (\n `id` int(10) NOT NULL AUTO_INCREMENT,\n `target_table` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `pk1` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `pk2` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `pk3` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `task_id` int(10) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n KEY `IDX_1` (`pk1`,`pk2`,`pk3`,`target_table`) USING BTREE\n) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "target_table", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "target_table" + }, + { + "objectType": "TableField_MYSQL", + "name": "pk1", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "pk1" + }, + { + "objectType": "TableField_MYSQL", + "name": "pk2", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "pk2" + }, + { + "objectType": "TableField_MYSQL", + "name": "pk3", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "pk3" + }, + { + "objectType": "TableField_MYSQL", + "name": "task_id", + "type": "int", + "length": 10, + "decimals": 0, + "isUnsigned": true, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "task_id" + } + ], + "indexes": [ + { + "objectType": "Index_MYSQL", + "name": "IDX_1", + "type": "NORMAL", + "method": "BTREE", + "comment": "", + "oldName": "IDX_1", + "online": false, + "keyBlockSize": 0, + "parser": "", + "algorithm": "", + "lock": "", + "collation": "A", + "cardinality": "3", + "packed": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "pk1", + "keyLength": 0, + "order": "", + "oldName": "pk1" + }, + { + "objectType": "IndexField_MYSQL", + "name": "pk2", + "keyLength": 0, + "order": "", + "oldName": "pk2" + }, + { + "objectType": "IndexField_MYSQL", + "name": "pk3", + "keyLength": 0, + "order": "", + "oldName": "pk3" + }, + { + "objectType": "IndexField_MYSQL", + "name": "target_table", + "keyLength": 0, + "order": "", + "oldName": "target_table" + } + ] + } + ], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device", + "comment": "設備基本資料表", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-19 06:41:48", + "checkTime": "", + "dataFree": 4194304, + "dataLength": 6864896, + "indexLength": 0, + "maxDataLength": 0, + "rows": 23576, + "updateTime": "2022-10-20 03:14:28", + "DDL": "CREATE TABLE `device` (\n `device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否刪除 0:否、1:是',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態,0:關閉;1:正常;2:異常;',\n `priority` int(11) NOT NULL DEFAULT '0' COMMENT '順序',\n `is_link` smallint(1) DEFAULT NULL COMMENT '是否與N4同步,0為無;1為有',\n `device_coordinate` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備座標',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '設備名稱',\n `device_area_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'TPE' COMMENT '設備地區',\n `device_building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備棟別標籤',\n `device_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備系統標籤',\n `device_name_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備小類(名稱)標籤',\n `device_floor_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備樓層標籤',\n `device_master` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分電盤/迴路(舊)',\n `device_last_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備名稱(tag第七段)',\n `device_serial_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備流水號(tag第八段)',\n `device_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '完整 TagName 設備編號',\n `device_system_category_layer3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備類別',\n `device_model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備型號(未使用)',\n `device_ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備IP',\n `device_port` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備port',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`device_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備基本資料表'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除 0:否、1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態,0:關閉;1:正常;2:異常;", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "順序", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_link", + "type": "smallint", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否與N4同步,0為無;1為有", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_link" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_coordinate", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備座標", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_coordinate" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_area_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'TPE'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備地區", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_area_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備棟別標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備系統標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備小類(名稱)標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_floor_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備樓層標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_floor_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_master", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "分電盤/迴路(舊)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_master" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_last_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備名稱(tag第七段)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_last_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_serial_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備流水號(tag第八段)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_serial_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_number", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "完整 TagName 設備編號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_number" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_category_layer3", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備類別", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_category_layer3" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_model", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備型號(未使用)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_model" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_ip", + "type": "varchar", + "length": 15, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備IP", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_ip" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_port", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備port", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_port" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "device_guid", + "keyLength": 0, + "order": "", + "oldName": "device_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_bak", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_bak", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-19 05:56:57", + "checkTime": "", + "dataFree": 0, + "dataLength": 9977856, + "indexLength": 0, + "maxDataLength": 0, + "rows": 23394, + "updateTime": "", + "DDL": "CREATE TABLE `device_bak` (\n `device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否刪除 0:否、1:是',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態,0:關閉;1:正常;2:異常;',\n `priority` int(11) NOT NULL DEFAULT '0' COMMENT '順序',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '區域guid',\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統大類guid',\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統小類guid',\n `floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '樓層guid',\n `device_coordinate` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備座標',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '設備名稱',\n `device_area_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'TPE' COMMENT '設備地區',\n `device_building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備棟別標籤',\n `device_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備系統標籤',\n `device_name_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備小類(名稱)標籤',\n `device_floor_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備樓層標籤',\n `device_master` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分電盤/迴路(舊)',\n `device_last_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備名稱(tag第七段)',\n `device_serial_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備流水號(tag第八段)',\n `device_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '完整 TagName 設備編號',\n `device_system_category_layer3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備類別',\n `device_model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備型號(未使用)',\n `device_ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備IP',\n `device_port` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備port',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間'\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除 0:否、1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態,0:關閉;1:正常;2:異常;", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "順序", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "區域guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_coordinate", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備座標", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_coordinate" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_area_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'TPE'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備地區", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_area_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備棟別標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備系統標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備小類(名稱)標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_floor_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備樓層標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_floor_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_master", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "分電盤/迴路(舊)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_master" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_last_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備名稱(tag第七段)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_last_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_serial_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備流水號(tag第八段)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_serial_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_number", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "完整 TagName 設備編號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_number" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_category_layer3", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備類別", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_category_layer3" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_model", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備型號(未使用)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_model" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_ip", + "type": "varchar", + "length": 15, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備IP", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_ip" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_port", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備port", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_port" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_disaster", + "comment": "設備與防災類型對應表", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_disaster", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:24:39", + "checkTime": "", + "dataFree": 0, + "dataLength": 1589248, + "indexLength": 0, + "maxDataLength": 0, + "rows": 24196, + "updateTime": "", + "DDL": "CREATE TABLE `device_disaster` (\n `device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備guid',\n `device_system_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '防災類型',\n PRIMARY KEY (`device_guid`,`device_system_value`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備與防災類型對應表'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_value", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "防災類型", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_value" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "device_guid", + "keyLength": 0, + "order": "", + "oldName": "device_guid" + }, + { + "objectType": "IndexField_MYSQL", + "name": "device_system_value", + "keyLength": 0, + "order": "", + "oldName": "device_system_value" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_group", + "comment": "設備類別 - UI 過濾用", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_group", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:14:31", + "checkTime": "", + "dataFree": 0, + "dataLength": 147456, + "indexLength": 0, + "maxDataLength": 0, + "rows": 1040, + "updateTime": "", + "DDL": "CREATE TABLE `device_group` (\n `id` int(11) NOT NULL COMMENT 'id',\n `device_disaster` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '災類',\n `device_building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備東別guid',\n `device_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備樓層guid',\n `device_system_category_layer2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_system_category_layer3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_amount` int(11) NOT NULL DEFAULT '0' COMMENT '設備總計',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備類別 - UI 過濾用'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_disaster", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "災類", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_disaster" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備東別guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_category_layer2", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_category_layer2" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_category_layer3", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_category_layer3" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_amount", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備總計", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_amount" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_item", + "comment": "設備項目", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 256, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_item", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-21 02:43:38", + "checkTime": "", + "dataFree": 0, + "dataLength": 49152, + "indexLength": 0, + "maxDataLength": 0, + "rows": 168, + "updateTime": "2022-10-20 06:11:00", + "DDL": "CREATE TABLE `device_item` (\n `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已刪除',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '''''' COMMENT '名稱',\n `points` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '點位',\n `unit` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '單位',\n `is_show` tinyint(4) NOT NULL COMMENT '是否顯示平面圖,0不顯示;1顯示',\n `is_show_riserDiagram` tinyint(4) DEFAULT '0' COMMENT '是否顯示昇位圖,0不顯示;1顯示',\n `is_controll` tinyint(4) NOT NULL COMMENT '是否可為燈號選單,0不可以;1可以',\n `is_bool` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否布林值,0否;1是',\n `is_link` smallint(1) DEFAULT NULL COMMENT '是否與N4同步,0為無;1為有',\n `device_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統大類tag',\n `device_name_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統小類tag',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=266 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備項目'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否已刪除", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "points", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "點位", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "points" + }, + { + "objectType": "TableField_MYSQL", + "name": "unit", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "單位", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "unit" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_show", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否顯示平面圖,0不顯示;1顯示", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_show" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_show_riserDiagram", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否顯示昇位圖,0不顯示;1顯示", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_show_riserDiagram" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_controll", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否可為燈號選單,0不可以;1可以", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_controll" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_bool", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否布林值,0否;1是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_bool" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_link", + "type": "smallint", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否與N4同步,0為無;1為有", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_link" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_item_bak", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_item_bak", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 06:06:17", + "checkTime": "", + "dataFree": 0, + "dataLength": 49152, + "indexLength": 0, + "maxDataLength": 0, + "rows": 168, + "updateTime": "", + "DDL": "CREATE TABLE `device_item_bak` (\n `id` int(11) DEFAULT NULL,\n `deleted` tinyint(4) NOT NULL DEFAULT '0',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '''''',\n `points` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `unit` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `is_show` tinyint(4) NOT NULL,\n `is_show_riserDiagram` tinyint(4) DEFAULT '0',\n `is_controll` tinyint(4) NOT NULL,\n `is_bool` tinyint(4) NOT NULL DEFAULT '0',\n `is_link` smallint(1) DEFAULT NULL COMMENT '是否與N4同步,0為無;1為有',\n `device_area_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_building_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_system_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_name_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL',\n `updated_at` datetime DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "points", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "points" + }, + { + "objectType": "TableField_MYSQL", + "name": "unit", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "unit" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_show", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_show" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_show_riserDiagram", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_show_riserDiagram" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_controll", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_controll" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_bool", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_bool" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_link", + "type": "smallint", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否與N4同步,0為無;1為有", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_link" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_area_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_area_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_kind", + "comment": "設備種類 ex: 燈號與點位設定", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_kind", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 08:51:01", + "checkTime": "", + "dataFree": 0, + "dataLength": 311296, + "indexLength": 0, + "maxDataLength": 0, + "rows": 717, + "updateTime": "", + "DDL": "CREATE TABLE `device_kind` (\n `device_kind_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備種類guid',\n `device_building_tag` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備東別標簽',\n `device_system_tag` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備系統標籤',\n `device_system_tag_old` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統大類guid\\r',\n `device_floor_tag` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備樓層標簽',\n `device_name_tag` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備名稱標籤\\r',\n `device_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備圖片',\n `device_normal_text` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '正常狀態顯示文字',\n `device_normal_point_id` int(11) DEFAULT NULL COMMENT '正常狀態偵測點位id',\n `device_normal_point_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '正常狀態偵測點位guid\\r',\n `device_normal_point_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '正常狀態偵測點位名稱',\n `device_normal_point_col` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '正常狀態偵測點位欄位',\n `device_normal_point_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '正常狀態偵測點位值',\n `device_normal_color` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '正常狀態:hex16 color,device status = 1\\r',\n `device_normal_flashing` tinyint(4) NOT NULL COMMENT '正常狀態是否閃爍 0否, 1是\\r',\n `device_close_text` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '關閉狀態顯示文字',\n `device_close_point_id` int(11) DEFAULT NULL COMMENT '關閉狀態偵測點位id',\n `device_close_point_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '關閉狀態偵測點位guid\\r',\n `device_close_point_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '關閉狀態偵測點位名稱\\r',\n `device_close_point_col` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '關閉狀態偵測點位欄位',\n `device_close_point_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '關閉狀態偵測點位值',\n `device_close_color` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '關閉狀態:hex16 color,device status = 1\\r',\n `device_close_flashing` tinyint(4) NOT NULL COMMENT '關閉狀態是否閃爍 0否,1是',\n `device_error_text` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '異常狀態顯示文字',\n `device_error_point_id` int(11) DEFAULT NULL COMMENT '異常狀態偵測點位id',\n `device_error_point_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '異常狀態偵測點位guid',\n `device_error_point_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '異常狀態偵測點位名稱\\r',\n `device_error_point_col` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '異常狀態偵測點位欄位\\r',\n `device_error_point_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '異常狀態偵測點位值\\r',\n `device_error_color` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '異常狀態:hex16 color,device status = 2\\r',\n `device_error_flashing` tinyint(4) NOT NULL COMMENT '異常狀態是否閃爍 0否, 1是\\r',\n `device_error_independent` tinyint(4) NOT NULL DEFAULT '0' COMMENT '異常狀態是否獨立顯示 0否, 1是',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`device_kind_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備種類 ex: 燈號與點位設定'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "device_kind_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備種類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_kind_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備東別標簽", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備系統標籤", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag_old", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類guid\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag_old" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_floor_tag", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備樓層標簽", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_floor_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備名稱標籤\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_image", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備圖片", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_image" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_text", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態顯示文字", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_text" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_point_id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態偵測點位id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_point_id" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_point_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態偵測點位guid\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_point_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_point_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態偵測點位名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_point_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_point_col", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態偵測點位欄位", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_point_col" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_point_value", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態偵測點位值", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_point_value" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_color", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態:hex16 color,device status = 1\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_color" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_normal_flashing", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "正常狀態是否閃爍 0否, 1是\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_normal_flashing" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_text", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態顯示文字", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_text" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_point_id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態偵測點位id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_point_id" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_point_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態偵測點位guid\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_point_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_point_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態偵測點位名稱\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_point_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_point_col", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態偵測點位欄位", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_point_col" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_point_value", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態偵測點位值", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_point_value" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_color", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態:hex16 color,device status = 1\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_color" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_close_flashing", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "關閉狀態是否閃爍 0否,1是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_close_flashing" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_text", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態顯示文字", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_text" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_point_id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態偵測點位id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_point_id" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_point_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態偵測點位guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_point_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_point_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態偵測點位名稱\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_point_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_point_col", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態偵測點位欄位\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_point_col" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_point_value", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態偵測點位值\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_point_value" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_color", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態:hex16 color,device status = 2\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_color" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_flashing", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態是否閃爍 0否, 1是\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_flashing" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_error_independent", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "異常狀態是否獨立顯示 0否, 1是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_error_independent" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "device_kind_guid", + "keyLength": 0, + "order": "", + "oldName": "device_kind_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_master", + "comment": "分電盤", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_master", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:55:28", + "checkTime": "", + "dataFree": 0, + "dataLength": 98304, + "indexLength": 0, + "maxDataLength": 0, + "rows": 302, + "updateTime": "", + "DDL": "CREATE TABLE `device_master` (\n `device_master_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分電盤guid',\n `device_building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '棟別guid',\n `device_name_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `device_master_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備master 編號',\n `device_master_full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '0' COMMENT '設備master 名稱',\n `device_master_icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備master 圖示',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`device_master_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分電盤'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "device_master_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "分電盤guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_master_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_master_number", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備master 編號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_master_number" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_master_full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'0'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備master 名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_master_full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_master_icon", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備master 圖示", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_master_icon" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "device_master_guid", + "keyLength": 0, + "order": "", + "oldName": "device_master_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_node", + "comment": "燈", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_node", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:56:35", + "checkTime": "", + "dataFree": 4194304, + "dataLength": 2637824, + "indexLength": 0, + "maxDataLength": 0, + "rows": 10942, + "updateTime": "", + "DDL": "CREATE TABLE `device_node` (\n `device_node_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備子節點guid\\r',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否刪除。0:否;1:是\\r',\n `device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備guid\\r',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備子節點名稱\\r',\n `device_node_coordinate` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備子節點座標\\r',\n `priority` int(11) NOT NULL DEFAULT '0' COMMENT '順序',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`device_node_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='燈'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "device_node_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備子節點guid\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_node_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除。0:否;1:是\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備guid\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備子節點名稱\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_node_coordinate", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備子節點座標\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_node_coordinate" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "順序", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "device_node_guid", + "keyLength": 0, + "order": "", + "oldName": "device_node_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "emergency_event", + "comment": "緊急應變 - 事件", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "emergency_event", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:50:08", + "checkTime": "", + "dataFree": 0, + "dataLength": 65536, + "indexLength": 0, + "maxDataLength": 0, + "rows": 224, + "updateTime": "", + "DDL": "CREATE TABLE `emergency_event` (\n `emergency_event_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `deleted` tinyint(4) DEFAULT '0' COMMENT '是否刪除 0:否、1:是',\n `disaster` tinyint(4) DEFAULT NULL COMMENT '防災',\n `device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備guid',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '棟別guid',\n `type` tinyint(4) DEFAULT NULL COMMENT '類別 0:正式 1:演習',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n PRIMARY KEY (`emergency_event_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='緊急應變 - 事件'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "emergency_event_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "emergency_event_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除 0:否、1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "disaster", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "防災", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "disaster" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "type", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "類別 0:正式 1:演習", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "type" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "emergency_event_guid", + "keyLength": 0, + "order": "", + "oldName": "emergency_event_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "emergency_item", + "comment": "SOP 每個步驟", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "emergency_item", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:52:24", + "checkTime": "", + "dataFree": 0, + "dataLength": 393216, + "indexLength": 0, + "maxDataLength": 0, + "rows": 1603, + "updateTime": "", + "DDL": "CREATE TABLE `emergency_item` (\n `emergency_item_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `event_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `big_setting` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `step_setting` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `finished` tinyint(4) DEFAULT '0',\n `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`emergency_item_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='SOP 每個步驟'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "emergency_item_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "emergency_item_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "event_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "event_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "big_setting", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "big_setting" + }, + { + "objectType": "TableField_MYSQL", + "name": "step_setting", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "step_setting" + }, + { + "objectType": "TableField_MYSQL", + "name": "finished", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "finished" + }, + { + "objectType": "TableField_MYSQL", + "name": "reason", + "type": "text", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "reason" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "emergency_item_guid", + "keyLength": 0, + "order": "", + "oldName": "emergency_item_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "emergency_member", + "comment": "聯絡人", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "emergency_member", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:11:52", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 7, + "updateTime": "", + "DDL": "CREATE TABLE `emergency_member` (\n `emergency_member_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聯絡人guid',\n `deleted` tinyint(4) DEFAULT '0',\n `grouping` int(11) DEFAULT NULL COMMENT '組別',\n `full_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '姓名',\n `department` int(11) DEFAULT NULL COMMENT '部門',\n `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電話',\n `lineid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'LINE ID',\n `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電子郵件',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間'\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='聯絡人'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "emergency_member_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "聯絡人guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "emergency_member_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "grouping", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "組別", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "grouping" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "姓名", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "department", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "部門", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "department" + }, + { + "objectType": "TableField_MYSQL", + "name": "phone", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "電話", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "phone" + }, + { + "objectType": "TableField_MYSQL", + "name": "lineid", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "LINE ID", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "lineid" + }, + { + "objectType": "TableField_MYSQL", + "name": "email", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "電子郵件", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "email" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "emergency_setting", + "comment": "SOP 流程\r", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "emergency_setting", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:22:54", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 60, + "updateTime": "", + "DDL": "CREATE TABLE `emergency_setting` (\n `emergency_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `deleted` tinyint(4) DEFAULT '0' COMMENT '是否刪除 0:否、1:是',\n `status` tinyint(4) DEFAULT '0' COMMENT '狀態',\n `priority` int(11) DEFAULT NULL COMMENT '順序',\n `big_setting` int(11) DEFAULT '0' COMMENT '大步驟',\n `full_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '小步驟名稱',\n `set_doing` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '執行步驟名稱',\n `url_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '超連結文字',\n `url_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '超連結網址',\n `not_answer` tinyint(4) DEFAULT NULL COMMENT '是否填寫取消原因 0:否、1:是',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`emergency_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='SOP 流程\\r'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "emergency_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "emergency_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除 0:否、1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "順序", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "big_setting", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "大步驟", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "big_setting" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 100, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "小步驟名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "set_doing", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "執行步驟名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "set_doing" + }, + { + "objectType": "TableField_MYSQL", + "name": "url_text", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "超連結文字", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "url_text" + }, + { + "objectType": "TableField_MYSQL", + "name": "url_link", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "超連結網址", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "url_link" + }, + { + "objectType": "TableField_MYSQL", + "name": "not_answer", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否填寫取消原因 0:否、1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "not_answer" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "emergency_guid", + "keyLength": 0, + "order": "", + "oldName": "emergency_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "floor", + "comment": "樓層", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "floor", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-21 03:46:31", + "checkTime": "", + "dataFree": 0, + "dataLength": 65536, + "indexLength": 0, + "maxDataLength": 0, + "rows": 138, + "updateTime": "2022-10-20 15:24:52", + "DDL": "CREATE TABLE `floor` (\n `floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '樓層guid',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '區域guid',\n `building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '東別tag',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否刪除。0:否;1:是',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '樓層名稱',\n `InitMapName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '使用者命名地圖檔檔名',\n `floor_map_name` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '地圖檔案名稱',\n `priority` int(11) NOT NULL DEFAULT '0' COMMENT '順序',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`building_tag`,`floor_guid`,`full_name`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='樓層'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "區域guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "東別tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除。0:否;1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "樓層名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "InitMapName", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "使用者命名地圖檔檔名", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "InitMapName" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_map_name", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "地圖檔案名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_map_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "順序", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "building_tag", + "keyLength": 0, + "order": "", + "oldName": "building_tag" + }, + { + "objectType": "IndexField_MYSQL", + "name": "floor_guid", + "keyLength": 0, + "order": "", + "oldName": "floor_guid" + }, + { + "objectType": "IndexField_MYSQL", + "name": "full_name", + "keyLength": 0, + "order": "", + "oldName": "full_name" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "history_config", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 7, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "history_config", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 6, + "updateTime": "", + "DDL": "CREATE TABLE `history_config` (\n `ID` int(11) NOT NULL AUTO_INCREMENT,\n `ID_` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `HISTORYNAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `SOURCE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `SOURCEHANDLE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `TIMEZONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `INTERVAL_` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `SYSTEMTAGS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `VALUEFACETS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `TABLE_NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `DB_TIMEZONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n PRIMARY KEY (`ID`)\n) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "ID", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ID" + }, + { + "objectType": "TableField_MYSQL", + "name": "ID_", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ID_" + }, + { + "objectType": "TableField_MYSQL", + "name": "HISTORYNAME", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "HISTORYNAME" + }, + { + "objectType": "TableField_MYSQL", + "name": "SOURCE", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "SOURCE" + }, + { + "objectType": "TableField_MYSQL", + "name": "SOURCEHANDLE", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "SOURCEHANDLE" + }, + { + "objectType": "TableField_MYSQL", + "name": "TIMEZONE", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "TIMEZONE" + }, + { + "objectType": "TableField_MYSQL", + "name": "INTERVAL_", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "INTERVAL_" + }, + { + "objectType": "TableField_MYSQL", + "name": "SYSTEMTAGS", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "SYSTEMTAGS" + }, + { + "objectType": "TableField_MYSQL", + "name": "VALUEFACETS", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "VALUEFACETS" + }, + { + "objectType": "TableField_MYSQL", + "name": "TABLE_NAME", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "TABLE_NAME" + }, + { + "objectType": "TableField_MYSQL", + "name": "DB_TIMEZONE", + "type": "varchar", + "length": 500, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "DB_TIMEZONE" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "ID", + "keyLength": 0, + "order": "", + "oldName": "ID" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "import_niagara_item", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 639, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "import_niagara_item", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-19 09:18:25", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 58, + "updateTime": "2022-10-20 09:22:15", + "DDL": "CREATE TABLE `import_niagara_item` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `device_area_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_building_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_system_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_name_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_point_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `check_status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=639 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_area_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_area_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_point_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_point_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "check_status", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "check_status" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "import_niagara_tag", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 101, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "import_niagara_tag", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-19 09:18:21", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 10, + "updateTime": "2022-10-20 09:22:15", + "DDL": "CREATE TABLE `import_niagara_tag` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `db_tags` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `niagara_tags` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_area_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_building_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_system_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_name_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_floor_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_master_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_last_name_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_serial_tag` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `atDateTime` datetime(1) DEFAULT NULL,\n `is_used` smallint(1) DEFAULT '0',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "db_tags", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "db_tags" + }, + { + "objectType": "TableField_MYSQL", + "name": "niagara_tags", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "niagara_tags" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_area_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_area_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_floor_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_floor_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_master_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_master_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_last_name_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_last_name_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_serial_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_serial_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "atDateTime", + "type": "datetime", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "atDateTime" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_used", + "type": "smallint", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_used" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "light_schedule", + "comment": "燈控排程", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "light_schedule", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 02:12:12", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 3, + "updateTime": "", + "DDL": "CREATE TABLE `light_schedule` (\n `light_schedule_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '燈控排程guid',\n `deleted` tinyint(4) DEFAULT '0' COMMENT '是否刪除 0:否、1:是',\n `status` tinyint(4) DEFAULT NULL COMMENT '狀態',\n `full_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '全名',\n `week` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `cycle` tinyint(4) DEFAULT NULL,\n `floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '樓層guid',\n `start_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '開始時間',\n `end_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '結束時間',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`light_schedule_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='燈控排程'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "light_schedule_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "燈控排程guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "light_schedule_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除 0:否、1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 100, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "全名", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "week", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "week" + }, + { + "objectType": "TableField_MYSQL", + "name": "cycle", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "cycle" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "start_time", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "開始時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "start_time" + }, + { + "objectType": "TableField_MYSQL", + "name": "end_time", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "結束時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "end_time" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "light_schedule_guid", + "keyLength": 0, + "order": "", + "oldName": "light_schedule_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "main_system", + "comment": "系統大類(Menu)", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "main_system", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:05:10", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 12, + "updateTime": "", + "DDL": "CREATE TABLE `main_system` (\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已刪除',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '名稱',\n `priority` int(11) NOT NULL DEFAULT '0' COMMENT '優先程度',\n `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '代碼',\n `code_old` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`main_system_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系統大類(Menu)'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否已刪除", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "優先程度", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "code", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "代碼", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "code" + }, + { + "objectType": "TableField_MYSQL", + "name": "code_old", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "code_old" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "main_system_guid", + "keyLength": 0, + "order": "", + "oldName": "main_system_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "ontime_alarm_device_rawdata", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "ontime_alarm_device_rawdata", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 81920, + "indexLength": 0, + "maxDataLength": 0, + "rows": 263, + "updateTime": "", + "DDL": "CREATE TABLE `ontime_alarm_device_rawdata` (\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備編號',\n `name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '點位名稱',\n `source_state` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '狀態值',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,\n PRIMARY KEY (`device_number`,`name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_number", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備編號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_number" + }, + { + "objectType": "TableField_MYSQL", + "name": "name", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "點位名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "name" + }, + { + "objectType": "TableField_MYSQL", + "name": "source_state", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態值", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "source_state" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": true, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "device_number", + "keyLength": 0, + "order": "", + "oldName": "device_number" + }, + { + "objectType": "IndexField_MYSQL", + "name": "name", + "keyLength": 0, + "order": "", + "oldName": "name" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "ontime_device_rawdata", + "comment": "設備點位即時值原始資料", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "ontime_device_rawdata", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 6832128, + "indexLength": 0, + "maxDataLength": 0, + "rows": 31293, + "updateTime": "", + "DDL": "CREATE TABLE `ontime_device_rawdata` (\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備編號',\n `name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '點位名稱',\n `value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '點為值',\n `is_bool` tinyint(1) DEFAULT NULL COMMENT '是否為布林值,0:否;1:是',\n `facets` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,\n PRIMARY KEY (`device_number`,`name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備點位即時值原始資料'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_number", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備編號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_number" + }, + { + "objectType": "TableField_MYSQL", + "name": "name", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "點位名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "name" + }, + { + "objectType": "TableField_MYSQL", + "name": "value", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "點為值", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "value" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_bool", + "type": "tinyint", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否為布林值,0:否;1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_bool" + }, + { + "objectType": "TableField_MYSQL", + "name": "facets", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "facets" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": true, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "device_number", + "keyLength": 0, + "order": "", + "oldName": "device_number" + }, + { + "objectType": "IndexField_MYSQL", + "name": "name", + "keyLength": 0, + "order": "", + "oldName": "name" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "ontime_device_subscription", + "comment": "設備點位即時值訂閱表", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 78776, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "ontime_device_subscription", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 6832128, + "indexLength": 0, + "maxDataLength": 0, + "rows": 37577, + "updateTime": "", + "DDL": "CREATE TABLE `ontime_device_subscription` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=78776 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備點位即時值訂閱表'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_number", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_number" + }, + { + "objectType": "TableField_MYSQL", + "name": "name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "name" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "operation_back_log", + "comment": "系統記錄用", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 5079, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "operation_back_log", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:19:01", + "checkTime": "", + "dataFree": 4194304, + "dataLength": 1589248, + "indexLength": 0, + "maxDataLength": 0, + "rows": 4887, + "updateTime": "2022-10-21 07:15:50", + "DDL": "CREATE TABLE `operation_back_log` (\n `id` bigint(20) NOT NULL AUTO_INCREMENT,\n `controller_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `action_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `parameter` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=5079 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系統記錄用'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "bigint", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "controller_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "controller_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "action_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "action_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "parameter", + "type": "text", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "parameter" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "operation_log", + "comment": "記錄", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "operation_log", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:18:37", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 0, + "updateTime": "", + "DDL": "CREATE TABLE `operation_log` (\n `id` int(11) NOT NULL,\n `user_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '棟別guid',\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '系統大類guid',\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '系統小類guid',\n `action_name` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''',\n `parameter` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='記錄'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "user_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "user_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "action_name", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "action_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "parameter", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "parameter" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "orion_OrionAppVersion", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "orion_OrionAppVersion", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-13 07:41:15", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 0, + "updateTime": "", + "DDL": "CREATE TABLE `orion_OrionAppVersion` (\n `id` int(11) NOT NULL DEFAULT '0',\n `app` varchar(128) NOT NULL,\n `schemaVersion` varchar(128) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "app", + "type": "varchar", + "length": 128, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "app" + }, + { + "objectType": "TableField_MYSQL", + "name": "schemaVersion", + "type": "varchar", + "length": 128, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "schemaVersion" + } + ], + "indexes": [], + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "orion_OrionAudit", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "orion_OrionAudit", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-13 07:41:54", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 0, + "updateTime": "", + "DDL": "CREATE TABLE `orion_OrionAudit` (\n `id` int(11) NOT NULL DEFAULT '0',\n `timestamp` bigint(20) DEFAULT NULL,\n `userName` varchar(64) DEFAULT NULL,\n `objectTypeSpec` varchar(64) DEFAULT NULL,\n `objectDisplay` varchar(512) DEFAULT NULL,\n `auditType` int(11) DEFAULT NULL,\n `slotName` varchar(64) DEFAULT NULL,\n `oldValue` varchar(128) DEFAULT NULL,\n `newValue` varchar(128) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "timestamp", + "type": "bigint", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "timestamp" + }, + { + "objectType": "TableField_MYSQL", + "name": "userName", + "type": "varchar", + "length": 64, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "userName" + }, + { + "objectType": "TableField_MYSQL", + "name": "objectTypeSpec", + "type": "varchar", + "length": 64, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "objectTypeSpec" + }, + { + "objectType": "TableField_MYSQL", + "name": "objectDisplay", + "type": "varchar", + "length": 512, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "objectDisplay" + }, + { + "objectType": "TableField_MYSQL", + "name": "auditType", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "auditType" + }, + { + "objectType": "TableField_MYSQL", + "name": "slotName", + "type": "varchar", + "length": 64, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "slotName" + }, + { + "objectType": "TableField_MYSQL", + "name": "oldValue", + "type": "varchar", + "length": 128, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "oldValue" + }, + { + "objectType": "TableField_MYSQL", + "name": "newValue", + "type": "varchar", + "length": 128, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "newValue" + } + ], + "indexes": [], + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "realtime_combination", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "realtime_combination", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 0, + "updateTime": "", + "DDL": "CREATE TABLE `realtime_combination` (\n `combination_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `deleted` tinyint(3) unsigned NOT NULL DEFAULT '0',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `userinfo_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `updated_at` datetime DEFAULT NULL,\n PRIMARY KEY (`combination_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "combination_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "combination_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 3, + "decimals": 0, + "isUnsigned": true, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "userinfo_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "userinfo_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "combination_guid", + "keyLength": 0, + "order": "", + "oldName": "combination_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "realtime_combination_detail", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "realtime_combination_detail", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 0, + "updateTime": "", + "DDL": "CREATE TABLE `realtime_combination_detail` (\n `combination_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`combination_guid`,`device_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "combination_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "combination_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "combination_guid", + "keyLength": 0, + "order": "", + "oldName": "combination_guid" + }, + { + "objectType": "IndexField_MYSQL", + "name": "device_guid", + "keyLength": 0, + "order": "", + "oldName": "device_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "rescue_device", + "comment": "滅火器 - AED", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "rescue_device", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-18 01:21:09", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 11, + "updateTime": "", + "DDL": "CREATE TABLE `rescue_device` (\n `rescue_device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '滅火器 - AED guid',\n `rescue_device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '滅火器 - AED ID',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '棟別guid',\n `floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '樓層guid',\n `floor_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '樓層名稱',\n `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `rescue_device_kind` tinyint(4) DEFAULT NULL COMMENT '滅火器 - AED 類別',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT NULL COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`rescue_device_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='滅火器 - AED'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "rescue_device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "滅火器 - AED guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "rescue_device_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "rescue_device_id", + "type": "varchar", + "length": 100, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "滅火器 - AED ID", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "rescue_device_id" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "樓層名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "location", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "location" + }, + { + "objectType": "TableField_MYSQL", + "name": "rescue_device_kind", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "滅火器 - AED 類別", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "rescue_device_kind" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "rescue_device_guid", + "keyLength": 0, + "order": "", + "oldName": "rescue_device_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "role", + "comment": "角色", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "role", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:03:07", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 6, + "updateTime": "", + "DDL": "CREATE TABLE `role` (\n `role_guid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'newid()' COMMENT '角色guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已被刪除',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '名稱',\n `layer` tinyint(4) NOT NULL DEFAULT '1' COMMENT '前後台(後台人員0/前台人員1)',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`role_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='角色'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "role_guid", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'newid()'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "角色guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "role_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否已被刪除", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "layer", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "1", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "前後台(後台人員0/前台人員1)", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "layer" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "role_guid", + "keyLength": 0, + "order": "", + "oldName": "role_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "role_auth", + "comment": "角色授權", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "role_auth", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:03:28", + "checkTime": "", + "dataFree": 0, + "dataLength": 114688, + "indexLength": 0, + "maxDataLength": 0, + "rows": 903, + "updateTime": "", + "DDL": "CREATE TABLE `role_auth` (\n `role_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '角色guid',\n `AuthCode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '授權代碼',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n PRIMARY KEY (`AuthCode`,`role_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='角色授權'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "role_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'0'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "角色guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "role_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "AuthCode", + "type": "varchar", + "length": 10, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'0'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "授權代碼", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "AuthCode" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "AuthCode", + "keyLength": 0, + "order": "", + "oldName": "AuthCode" + }, + { + "objectType": "IndexField_MYSQL", + "name": "role_guid", + "keyLength": 0, + "order": "", + "oldName": "role_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "schedule_device", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "schedule_device", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 0, + "updateTime": "", + "DDL": "CREATE TABLE `schedule_device` (\n `Id` int(11) NOT NULL,\n `light_schedule_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n PRIMARY KEY (`Id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "Id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "Id" + }, + { + "objectType": "TableField_MYSQL", + "name": "light_schedule_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "light_schedule_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_guid" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "Id", + "keyLength": 0, + "order": "", + "oldName": "Id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "sub_system", + "comment": "系統小類(Menu)", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "sub_system", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:03:46", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 71, + "updateTime": "", + "DDL": "CREATE TABLE `sub_system` (\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統小類guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已刪除',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '名稱',\n `priority` int(11) NOT NULL DEFAULT '0' COMMENT '優先程度',\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統大類guid',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`sub_system_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系統小類(Menu)'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否已刪除", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "優先程度", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "sub_system_guid", + "keyLength": 0, + "order": "", + "oldName": "sub_system_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "sub_system_floor", + "comment": "系統樓層 (Menu)", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 8, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "sub_system_floor", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:04:04", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 5, + "updateTime": "2022-10-20 09:31:11", + "DDL": "CREATE TABLE `sub_system_floor` (\n `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 未刪除,1 刪除',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否與N4同步 0 沒有, 1 有',\n `is_link` smallint(1) DEFAULT NULL COMMENT '是否與N4同步,0為無;1為有',\n `building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '棟別tag',\n `main_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統大類tag',\n `sub_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統小類tag',\n `floor_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統小類tag',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`id`) USING BTREE\n) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系統樓層 (Menu)'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "0 未刪除,1 刪除", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否與N4同步 0 沒有, 1 有", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_link", + "type": "smallint", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否與N4同步,0為無;1為有", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_link" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "sub_system_floor_bak", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_0900_ai_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "sub_system_floor_bak", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-19 05:42:25", + "checkTime": "", + "dataFree": 0, + "dataLength": 376832, + "indexLength": 0, + "maxDataLength": 0, + "rows": 1243, + "updateTime": "", + "DDL": "CREATE TABLE `sub_system_floor_bak` (\n `sub_system_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統樓層guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0',\n `status` tinyint(4) NOT NULL DEFAULT '0',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '棟別guid',\n `main_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '系統大類guid',\n `sub_system_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '系統小類guid',\n `floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '樓層guid',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間'\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "sub_system_floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "building_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "temp_archived_data", + "comment": "", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "temp_archived_data", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-12 07:13:55", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 0, + "updateTime": "", + "DDL": "CREATE TABLE `temp_archived_data` (\n `id` int(11) NOT NULL,\n `temp_table` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `temp_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "temp_table", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "temp_table" + }, + { + "objectType": "TableField_MYSQL", + "name": "temp_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "temp_guid" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "userinfo", + "comment": "使用人員", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "userinfo", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:04:35", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 8, + "updateTime": "", + "DDL": "CREATE TABLE `userinfo` (\n `userinfo_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已刪除',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態',\n `role_guid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色序號',\n `account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '帳號',\n `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '密碼',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '''''' COMMENT '名稱',\n `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '''''' COMMENT '手機號碼',\n `tel` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '''''' COMMENT '聯絡電話',\n `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '''''' COMMENT '電子信箱',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''''' COMMENT '創建者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NULL' COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`userinfo_guid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='使用人員'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "userinfo_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "userinfo_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否已刪除", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "role_guid", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "角色序號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "role_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "account", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "帳號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "account" + }, + { + "objectType": "TableField_MYSQL", + "name": "password", + "type": "varchar", + "length": 64, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "密碼", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "password" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "phone", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "手機號碼", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "phone" + }, + { + "objectType": "TableField_MYSQL", + "name": "tel", + "type": "varchar", + "length": 20, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "聯絡電話", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "tel" + }, + { + "objectType": "TableField_MYSQL", + "name": "email", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "電子信箱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "email" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "'\\'\\''", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "'NULL'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "userinfo_guid", + "keyLength": 0, + "order": "", + "oldName": "userinfo_guid" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "variable", + "comment": "系統變數", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 215, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "variable", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:04:50", + "checkTime": "", + "dataFree": 0, + "dataLength": 49152, + "indexLength": 0, + "maxDataLength": 0, + "rows": 192, + "updateTime": "2022-10-20 04:54:13", + "DDL": "CREATE TABLE `variable` (\n `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已刪除',\n `system_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '類型',\n `system_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'KEY',\n `system_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '值',\n `system_remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '備註',\n `system_priority` int(11) NOT NULL DEFAULT '0' COMMENT '優先程度',\n `system_parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父項序號',\n `has3D` bit(1) DEFAULT b'1' COMMENT '是否開啓3D圖',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT NULL COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '編輯時間',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系統變數'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": true, + "comment": "id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否已刪除", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_type", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "類型", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_type" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_key", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "KEY", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_key" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_value", + "type": "text", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "值", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_value" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_remark", + "type": "text", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "備註", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_remark" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "優先程度", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_parent_id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "父項序號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_parent_id" + }, + { + "objectType": "TableField_MYSQL", + "name": "has3D", + "type": "bit", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "b'1'", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否開啓3D圖", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "has3D" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": true, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "building", + "comment": "棟別(字典檔)", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "building", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:15:02", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 8, + "updateTime": "2022-10-21 04:32:37", + "DDL": "CREATE TABLE `building` (\n `building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備棟別標籤',\n `building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '區域guid',\n `deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否刪除。0:否;1:是',\n `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '狀態',\n `full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '區域名稱',\n `ip_address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IP位置',\n `ip_port` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IP port號',\n `priority` int(11) DEFAULT '0' COMMENT '順序',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '建立者',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者',\n `updated_at` datetime DEFAULT NULL COMMENT '修改時間',\n PRIMARY KEY (`building_tag`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='東別(字典檔)'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "deleted", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否刪除。0:否;1:是", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "deleted" + }, + { + "objectType": "TableField_MYSQL", + "name": "status", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "狀態", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "status" + }, + { + "objectType": "TableField_MYSQL", + "name": "full_name", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "區域名稱", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "full_name" + }, + { + "objectType": "TableField_MYSQL", + "name": "ip_address", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "IP位置", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ip_address" + }, + { + "objectType": "TableField_MYSQL", + "name": "ip_port", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "IP port號", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "ip_port" + }, + { + "objectType": "TableField_MYSQL", + "name": "priority", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "順序", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "priority" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Empty", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "建立者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "建立時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "修改者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "修改時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "building_tag", + "keyLength": 0, + "order": "", + "oldName": "building_tag" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "building_menu", + "comment": "Menu本身", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "building_menu", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-19 06:39:51", + "checkTime": "", + "dataFree": 0, + "dataLength": 16384, + "indexLength": 0, + "maxDataLength": 0, + "rows": 5, + "updateTime": "2022-10-21 07:01:14", + "DDL": "CREATE TABLE `building_menu` (\n `building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '棟別tag',\n `main_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統大類tag',\n `sub_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '系統小類tag',\n `drawing` tinyint(4) DEFAULT NULL COMMENT '預設頁面 4:昇位圖, 2:系統圖, 1:樓層平面圖, 3:彈出URL, 5:3D圖',\n `icon_click` tinyint(4) DEFAULT '0' COMMENT '昇位/平面圖 icon click 開關 0:URL 1:開關',\n `icon_click_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '昇位/平面圖 icon click URL',\n `icon_click_url_width` int(11) DEFAULT '0' COMMENT '昇位圖 彈出視窗寬度',\n `icon_click_url_height` int(11) DEFAULT '0' COMMENT '昇位圖 彈出視窗高度',\n `planimetric_click` tinyint(4) DEFAULT '0' COMMENT '是否顯示平面圖 1:開 0:關\\r',\n `planimetric_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '平面圖選擇樓層',\n `system_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統圖 URL\\r',\n `riser_diagram_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '昇位圖URL',\n `device_building_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備棟別標籤',\n `device_system_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備系統標籤',\n `OpenTab` smallint(6) DEFAULT NULL COMMENT '0 開在自己的熒幕, 1 開第一個熒幕, 2 開第二個熒幕',\n `is_link` smallint(1) DEFAULT NULL COMMENT '是否與N4同步,0為無;1為有',\n `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '創建者',\n `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',\n `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '編輯者',\n `updated_at` datetime DEFAULT NULL COMMENT '編輯時間',\n PRIMARY KEY (`building_tag`,`main_system_tag`,`sub_system_tag`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Menu本身'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "main_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "main_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "sub_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統小類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "sub_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "drawing", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "預設頁面 4:昇位圖, 2:系統圖, 1:樓層平面圖, 3:彈出URL, 5:3D圖", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "drawing" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位/平面圖 icon click 開關 0:URL 1:開關", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click_url", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位/平面圖 icon click URL", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click_url" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click_url_width", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位圖 彈出視窗寬度", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click_url_width" + }, + { + "objectType": "TableField_MYSQL", + "name": "icon_click_url_height", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位圖 彈出視窗高度", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "icon_click_url_height" + }, + { + "objectType": "TableField_MYSQL", + "name": "planimetric_click", + "type": "tinyint", + "length": 4, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否顯示平面圖 1:開 0:關\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "planimetric_click" + }, + { + "objectType": "TableField_MYSQL", + "name": "planimetric_floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "平面圖選擇樓層", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "planimetric_floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "system_url", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統圖 URL\r", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "system_url" + }, + { + "objectType": "TableField_MYSQL", + "name": "riser_diagram_url", + "type": "varchar", + "length": 255, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "昇位圖URL", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "riser_diagram_url" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "棟別tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_tag", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "系統大類tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "OpenTab", + "type": "smallint", + "length": 6, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "0 開在自己的熒幕, 1 開第一個熒幕, 2 開第二個熒幕", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "OpenTab" + }, + { + "objectType": "TableField_MYSQL", + "name": "is_link", + "type": "smallint", + "length": 1, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "是否與N4同步,0為無;1為有", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "is_link" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "created_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "CURRENT_TIMESTAMP", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "創建時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "created_at" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_by", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯者", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_by" + }, + { + "objectType": "TableField_MYSQL", + "name": "updated_at", + "type": "datetime", + "length": 0, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "編輯時間", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "updated_at" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "building_tag", + "keyLength": 0, + "order": "", + "oldName": "building_tag" + }, + { + "objectType": "IndexField_MYSQL", + "name": "main_system_tag", + "keyLength": 0, + "order": "", + "oldName": "main_system_tag" + }, + { + "objectType": "IndexField_MYSQL", + "name": "sub_system_tag", + "keyLength": 0, + "order": "", + "oldName": "sub_system_tag" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] + } + ], + "views": [] + } + ] + }, + "diagrams": [ + { + "name": "Diagram 1", + "paperWidth": 3, + "paperHeight": 2, + "tableFont": "Arial Unicode MS", + "tableFontSize": 14, + "isBalckWhite": false, + "showDBSchemaName": false, + "showViewRelations": true, + "notation": "default", + "showFieldComment": true, + "showTableComment": true, + "shapes": [ + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "auth_page", + "x": 20, + "y": 1440, + "width": 270, + "height": 250, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "building_menu", + "x": 720, + "y": 1260, + "width": 510, + "height": 430, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "data_delivery_log", + "x": 1400, + "y": 2180, + "width": 181, + "height": 170, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "device", + "x": 580, + "y": 300, + "width": 370, + "height": 500, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "device_disaster", + "x": 1230, + "y": 1100, + "width": 320, + "height": 110, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "device_group", + "x": 330, + "y": 1890, + "width": 320, + "height": 210, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "device_item", + "x": 30, + "y": 300, + "width": 430, + "height": 340, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "device_kind", + "x": 1100, + "y": 70, + "width": 510, + "height": 750, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "device_master", + "x": 640, + "y": 10, + "width": 252, + "height": 230, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "device_node", + "x": 600, + "y": 850, + "width": 340, + "height": 250, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "emergency_event", + "x": 590, + "y": 2400, + "width": 280, + "height": 220, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "emergency_item", + "x": 1410, + "y": 2380, + "width": 237, + "height": 230, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "emergency_member", + "x": 890, + "y": 2360, + "width": 260, + "height": 260, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "emergency_setting", + "x": 10, + "y": 1990, + "width": 290, + "height": 310, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "floor", + "x": 350, + "y": 1320, + "width": 320, + "height": 310, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "history_config", + "x": 370, + "y": 2120, + "width": 218, + "height": 270, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "import_niagara_item", + "x": 220, + "y": 650, + "width": 240, + "height": 190, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "light_schedule", + "x": 1260, + "y": 1620, + "width": 330, + "height": 290, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "main_system", + "x": 870, + "y": 2080, + "width": 260, + "height": 250, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "ontime_alarm_device_rawdata", + "x": 2150, + "y": 30, + "width": 230, + "height": 230, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "ontime_device_subscription", + "x": 1610, + "y": 2150, + "width": 215, + "height": 190, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "operation_back_log", + "x": 1140, + "y": 2160, + "width": 204, + "height": 190, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "operation_log", + "x": 1170, + "y": 2390, + "width": 215, + "height": 230, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "orion_OrionAppVersion", + "x": 2450, + "y": 30, + "width": 205, + "height": 110, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "rescue_device", + "x": 10, + "y": 2320, + "width": 350, + "height": 250, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "role", + "x": 2230, + "y": 870, + "width": 181, + "height": 230, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "role_auth", + "x": 20, + "y": 1250, + "width": 250, + "height": 140, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "schedule_device", + "x": 360, + "y": 2430, + "width": 230, + "height": 110, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "sub_system", + "x": 600, + "y": 2110, + "width": 270, + "height": 220, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "sub_system_floor", + "x": 1880, + "y": 30, + "width": 208, + "height": 290, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "sub_system_floor_bak", + "x": 1920, + "y": 870, + "width": 239, + "height": 270, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "userinfo", + "x": 20, + "y": 870, + "width": 240, + "height": 330, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "variable", + "x": 290, + "y": 880, + "width": 250, + "height": 310, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "table", + "schemaName": "bims_mitsubishi", + "tableName": "building", + "x": 1260, + "y": 1270, + "width": 289, + "height": 310, + "isBold": false, + "titleColor": { + "r": 55, + "g": 131, + "b": 192, + "a": 1 + } + }, + { + "type": "arrow", + "name": "Arrow 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 580, + "y": 490 + }, + { + "x": 460, + "y": 490 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 770, + "y": 240 + }, + { + "x": 770, + "y": 300 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 770, + "y": 800 + }, + { + "x": 770, + "y": 850 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 460, + "y": 740 + }, + { + "x": 580, + "y": 740 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 2", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 140, + "y": 1200 + }, + { + "x": 140, + "y": 1250 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 2 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 140, + "y": 1440 + }, + { + "x": 140, + "y": 1390 + } + ] + } + ], + "layers": [], + "relations": [], + "viewRelations": [] + } + ] +} \ No newline at end of file diff --git a/Backend/Controllers/BuildInfoController.cs b/Backend/Controllers/BuildInfoController.cs index ac19472..9372572 100644 --- a/Backend/Controllers/BuildInfoController.cs +++ b/Backend/Controllers/BuildInfoController.cs @@ -44,7 +44,7 @@ namespace Backend.Controllers try { - var sqlString = @$"SELECT A.priority, A.building_guid, A.full_name, A.ip_address, A.ip_port, (SELECT COUNT(*) FROM floor f WHERE f.deleted = 0 AND f.building_guid = A.building_guid) AS 'floorNum', A.created_at + var sqlString = @$"SELECT A.priority, A.building_tag, A.full_name, A.ip_address, A.ip_port, (SELECT COUNT(*) FROM floor f WHERE f.deleted = 0 AND f.building_tag = A.building_tag) AS 'floorNum', A.created_at FROM building A WHERE A.deleted = 0 ORDER BY A.priority ASC, A.created_at DESC"; @@ -78,8 +78,8 @@ namespace Backend.Controllers //判斷監控主機IP是否重複 var judgeIPAddressRepeat = true; - var sWhere = $@"deleted = 0 AND ip_address = @ip_address AND ip_port = @ip_port AND building_guid != @building_guid"; - var buildInfos = await backendRepository.GetAllAsync("building", sWhere, new { ip_address = post.Ip_address, ip_port = post.Ip_port, building_guid = post.Building_guid }); + var sWhere = $@"deleted = 0 AND ip_address = @ip_address AND ip_port = @ip_port AND building_tag != @building_tag"; + var buildInfos = await backendRepository.GetAllAsync("building", sWhere, new { ip_address = post.Ip_address, ip_port = post.Ip_port, building_tag = post.building_tag }); if (buildInfos.Count == 0) { judgeIPAddressRepeat = false; @@ -87,46 +87,92 @@ namespace Backend.Controllers if (!judgeIPAddressRepeat) { + //Check for duplicate building tag + sWhere = $@"deleted = 0 AND building_tag = @Building_tag"; + buildInfos = await backendRepository.GetAllAsync("building", sWhere, new { building_tag = post.building_tag }); + + if (buildInfos.Count > 0) + { + apiResult.Code = "0002"; + apiResult.Msg = "區域代號不可重複"; + return apiResult; + } + //新增 - if (post.Building_guid == "0") + //抓取當前的Priority + var current_priority = await backendRepository.GetCurrentPriority("building"); + + Dictionary building = new Dictionary(); + building = new Dictionary() { - //產生一組GUID - var guid = Guid.NewGuid(); //大樓GUID + { "@building_tag", post.building_tag}, + { "@full_name", post.Full_name}, + { "@ip_address", post.Ip_address}, + { "@ip_port", post.Ip_port}, + { "@priority", current_priority + 1}, + { "@created_by", myUserInfo.Userinfo_guid} + }; + await backendRepository.AddOneByCustomTable(building, "building"); - //抓取當前的Priority - var current_priority = await backendRepository.GetCurrentPriority("building"); + apiResult.Code = "0000"; + apiResult.Msg = "新增成功"; + } + else + { + apiResult.Code = "0001"; + apiResult.Msg = "監控主機IP不可重複"; + } - Dictionary building = new Dictionary(); - building = new Dictionary() - { - { "@building_guid", guid}, - { "@full_name", post.Full_name}, - { "@ip_address", post.Ip_address}, - { "@ip_port", post.Ip_port}, - { "@priority", current_priority + 1}, - { "@created_by", myUserInfo.Userinfo_guid} - }; - await backendRepository.AddOneByCustomTable(building, "building"); + } + catch (Exception exception) + { + apiResult.Code = "9999"; + apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; + string json = System.Text.Json.JsonSerializer.Serialize(post); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + json); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); + } - apiResult.Code = "0000"; - apiResult.Msg = "新增成功"; - } - else //修改 + return apiResult; + } + + /// + /// 新增 / 修改 區域基本資料 + /// + /// + /// + [HttpPost] + public async Task> EditBuildInfo(BuildInfo post) + { + ApiResult apiResult = new ApiResult(); + + try + { + //判斷監控主機IP是否重複 + var judgeIPAddressRepeat = true; + + var sWhere = $@"deleted = 0 AND ip_address = @ip_address AND ip_port = @ip_port AND building_tag != @building_tag"; + var buildInfos = await backendRepository.GetAllAsync("building", sWhere, new { ip_address = post.Ip_address, ip_port = post.Ip_port, building_tag = post.building_tag }); + if (buildInfos.Count == 0) + { + judgeIPAddressRepeat = false; + } + + if (!judgeIPAddressRepeat) + { + Dictionary building = new Dictionary(); + building = new Dictionary() { - Dictionary building = new Dictionary(); - building = new Dictionary() - { - { "@full_name", post.Full_name}, - { "@ip_address", post.Ip_address}, - { "@ip_port", post.Ip_port}, - { "@updated_by", myUserInfo.Userinfo_guid}, - { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} - }; - await backendRepository.UpdateOneByCustomTable(building, "building", "building_guid='" + post.Building_guid + "'"); + { "@full_name", post.Full_name}, + { "@ip_address", post.Ip_address}, + { "@ip_port", post.Ip_port}, + { "@updated_by", myUserInfo.Userinfo_guid}, + { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} + }; + await backendRepository.UpdateOneByCustomTable(building, "building", "building_tag='" + post.building_tag + "'"); - apiResult.Code = "0000"; - apiResult.Msg = "修改成功"; - } + apiResult.Code = "0000"; + apiResult.Msg = "修改成功"; } else { @@ -148,14 +194,14 @@ namespace Backend.Controllers } [HttpPost] - public async Task> DeleteOneBuild(string guid) + public async Task> DeleteOneBuild(string tag) { var apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND building_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND building_tag = @Tag"; - object param = new { Deleted = 0, Guid = guid }; + object param = new { Deleted = 0, Tag = tag }; var buildInfo = await backendRepository.GetOneAsync("building", sWhere, param); @@ -167,8 +213,8 @@ namespace Backend.Controllers } //檢查是否有未刪除的區域選單 - var sbuildMenuWhere = $@"building_guid = @Guid"; - var buildMenus = await backendRepository.GetAllAsync("building_menu", sbuildMenuWhere, new { Guid = guid }); + var sbuildMenuWhere = $@"building_tag = @Tag"; + var buildMenus = await backendRepository.GetAllAsync("building_menu", sbuildMenuWhere, new { Tag = tag }); if (buildMenus.Count > 0) { @@ -178,8 +224,8 @@ namespace Backend.Controllers } //檢查底下是否有未刪除的樓層 - var sfloorWhere = $@"deleted = 0 AND building_guid = @Guid"; - var floors = await backendRepository.GetAllAsync("floor", sfloorWhere, new { Guid = guid }); + var sfloorWhere = $@"deleted = 0 AND building_tag = @tag"; + var floors = await backendRepository.GetAllAsync("floor", sfloorWhere, new { Tag = tag }); if (floors.Count > 0) { @@ -189,7 +235,7 @@ namespace Backend.Controllers return apiResult; } - await backendRepository.DeleteOne(guid, "building", "building_guid"); + await backendRepository.DeleteOne(tag, "building", "building_tag"); apiResult.Code = "0000"; apiResult.Msg = "刪除成功"; @@ -199,7 +245,7 @@ namespace Backend.Controllers { apiResult.Code = "9999"; apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; - Logger.LogError("【" + controllerName + "/" + actionName + "】" + "building_guid=" + guid); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + "building_tag=" + tag); Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } return apiResult; @@ -223,7 +269,7 @@ namespace Backend.Controllers Dictionary building_priority_dic = new Dictionary(); building_priority_dic = new Dictionary() { - { "building_guid", building_priority.Building_guid}, + { "building_tag", building_priority.Building_tag}, { "@priority", building_priority.Priority}, { "@updated_by", myUserInfo.Userinfo_guid}, { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} @@ -232,14 +278,9 @@ namespace Backend.Controllers building_priorities.Add(building_priority_dic); } - var sql = $@"UPDATE building SET priority = @priority, updated_by = @updated_by, updated_at=@updated_at WHERE building_guid = @building_guid"; + var sql = $@"UPDATE building SET priority = @priority, updated_by = @updated_by, updated_at=@updated_at WHERE building_tag = @building_tag"; await backendRepository.ExecuteSql(sql, building_priorities); - - #region 新增至派送資料表 - await backendRepository.ManualInsertBackgroundServiceTask("", "", "building", "update_list", building_priorities); - #endregion - } apiResult.Code = "0000"; @@ -261,7 +302,7 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task>> BuildFloorList(string BuildGuid) + public async Task>> BuildFloorList(string build_tag) { ApiResult> apiResult = new ApiResult>(); List buildInfo = new List(); @@ -271,9 +312,9 @@ namespace Backend.Controllers var sqlString = @$"SELECT A.floor_guid, A.full_name, InitMapName + '.svg' AS 'initMapName', A.priority, A.created_at FROM floor A WHERE deleted = @deleted - AND A.building_guid = @building_guid + AND A.building_tag = @building_tag ORDER BY A.priority ASC"; - buildInfo = await backendRepository.GetAllAsync(sqlString, new { deleted = 0, building_guid = BuildGuid }); + buildInfo = await backendRepository.GetAllAsync(sqlString, new { deleted = 0, building_tag = build_tag }); apiResult.Code = "0000"; apiResult.Data = buildInfo; @@ -348,13 +389,13 @@ namespace Backend.Controllers var floor_map_guid = Guid.NewGuid(); //抓取當前的Priority - var current_priority = await backendRepository.GetCurrentPriority("floor", "deleted = 0 AND building_guid = '" + post.Building_guid + "'"); + var current_priority = await backendRepository.GetCurrentPriority("floor", "deleted = 0 AND building_tag = '" + post.Building_tag + "'"); Dictionary floor = new Dictionary(); floor = new Dictionary() { { "@floor_guid", guid}, - { "@building_guid", post.Building_guid}, + { "@building_tag", post.Building_tag}, { "@full_name", post.Full_name}, { "@InitMapName", post.InitMapName}, { "@floor_map_name", floor_map_guid}, @@ -374,27 +415,7 @@ namespace Backend.Controllers { post.MapFile.CopyTo(stream); } - } - - #region 新增至派送資料表 - List fileInfos = new List(); - if (post.MapFile != null) - { - var split = post.MapFile.FileName.Split("."); - var fileName = floor_map_guid + "." + split[split.Length - 1]; - - var fullPath = Path.Combine(mapFileSaveAsPath, fileName); - - Repository.Models.FileInfo fileInfo = new Repository.Models.FileInfo(); - fileInfo.Folder = "floor_map"; - fileInfo.OriginalFileName = null; - fileInfo.FileName = fileName; - fileInfo.File = fullPath; - - fileInfos.Add(fileInfo); - await backendRepository.ManualInsertFileBackgroundServiceTask("", post.Building_guid, "floor", fileInfos); - } - #endregion + } apiResult.Code = "0000"; apiResult.Msg = "新增成功"; @@ -436,26 +457,6 @@ namespace Backend.Controllers } } - #region 新增至派送資料表 - List fileInfos = new List(); - if (post.MapFile != null) - { - var split = post.MapFile.FileName.Split("."); - var fileName = floor_map_guid + "." + split[split.Length - 1]; - - var fullPath = Path.Combine(mapFileSaveAsPath, fileName); - - Repository.Models.FileInfo fileInfo = new Repository.Models.FileInfo(); - fileInfo.Folder = "floor_map"; - fileInfo.OriginalFileName = buildFloor.Floor_map_name + ".svg"; - fileInfo.FileName = fileName; - fileInfo.File = fullPath; - - fileInfos.Add(fileInfo); - } - await backendRepository.ManualInsertFileBackgroundServiceTask("", post.Building_guid, "floor", fileInfos); - #endregion - apiResult.Code = "0000"; apiResult.Msg = "修改成功"; } @@ -502,10 +503,6 @@ namespace Backend.Controllers var sql = $@"UPDATE floor SET priority = @priority, updated_by = @updated_by, updated_at=@updated_at WHERE floor_guid = @floor_guid"; await backendRepository.ExecuteSql(sql, floor_priorities); - - #region 新增至派送資料表 - await backendRepository.ManualInsertBackgroundServiceTask("", "", "floor", "update_list", floor_priorities); - #endregion } apiResult.Code = "0000"; @@ -547,20 +544,20 @@ namespace Backend.Controllers //判斷區域選單是否還有使用該樓層 var sub_system_where = $@"SELECT - CONCAT(b.full_name, ' - ', ms.full_name, ' - ', ss.full_name) - FROM ( - SELECT - ssf.building_guid, - ssf.main_system_guid, - ssf.sub_system_guid - FROM sub_system_floor ssf - WHERE ssf.deleted = 0 AND floor_guid = @Guid - ) ssf - LEFT JOIN building b ON ssf.building_guid = b.building_guid AND b.deleted = 0 - LEFT JOIN main_system ms ON ssf.main_system_guid = ms.main_system_guid AND ms.deleted = 0 - LEFT JOIN sub_system ss ON ssf.sub_system_guid = ss.sub_system_guid AND ss.deleted = 0"; + CONCAT(b.full_name, ' - ', mv.system_key, ' - ', sv.system_key) + FROM ( + SELECT + ssf.building_tag, + ssf.main_system_tag, + ssf.sub_system_tag + FROM sub_system_floor ssf + WHERE ssf.deleted = 0 AND ssf.floor_tag = @floor_tag + ) ssf + LEFT JOIN building b ON ssf.building_tag = b.building_tag AND b.deleted = 0 + LEFT JOIN variable mv ON ssf.main_system_tag = mv.system_value AND mv.system_type = @main_system_type AND mv.deleted = 0 + LEFT JOIN variable sv ON ssf.sub_system_tag = sv.system_value AND sv.system_type = @sub_system_type AND sv.deleted = 0"; - var sub_system_floors = await backendRepository.GetAllAsync(sub_system_where, new { Guid = guid }); + var sub_system_floors = await backendRepository.GetAllAsync(sub_system_where, new { floor_tag = buildFloor.Full_name, main_system_type = main_system_type, sub_system_type = sub_system_type }); if (sub_system_floors.Count > 0) { apiResult.Code = "9997"; diff --git a/Backend/Controllers/BuildMenuController.cs b/Backend/Controllers/BuildMenuController.cs index ff1db9e..cd98d76 100644 --- a/Backend/Controllers/BuildMenuController.cs +++ b/Backend/Controllers/BuildMenuController.cs @@ -29,7 +29,7 @@ namespace Backend.Controllers try { - var sqlString = @$"select building_guid as Value, full_name as Name from building a where a.deleted = 0 and a.status = 0 ORDER BY A.priority ASC, A.created_at DESC"; + var sqlString = @$"select building_tag as Value, full_name as Name from building a where a.deleted = 0 and a.status = 0 ORDER BY a.priority ASC, a.created_at DESC"; KeyValue = await backendRepository.GetAllAsync(sqlString); apiResult.Code = "0000"; @@ -45,15 +45,22 @@ namespace Backend.Controllers return apiResult; } [HttpPost] - public async Task>> MainListBybuild(string build) + public async Task>> MainListBybuild(string building_tag) { ApiResult> apiResult = new ApiResult>(); List KeyValue = new List(); try { - var sqlString = @$"select ms.main_system_guid value, ms.full_name name from (select main_system_guid from building_menu bm where bm.building_guid = '{build}' group by bm.main_system_guid ) bm left join main_system ms on ms.main_system_guid = bm.main_system_guid ORDER BY ms.priority ASC"; - KeyValue = await backendRepository.GetAllAsync(sqlString); + var sqlString = @$"select v.system_value value, v.system_key name + from ( + select main_system_tag from building_menu bm where bm.building_tag = @building_tag group by bm.main_system_tag + ) bm + left join variable v on v.system_value = bm.main_system_tag AND v.system_type = @main_system_type and v.deleted = 0 + ORDER BY v.system_priority ASC"; + + var param = new { building_tag = building_tag, main_system_type = main_system_type }; + KeyValue = await backendRepository.GetAllAsync(sqlString, param); apiResult.Code = "0000"; apiResult.Data = KeyValue; @@ -74,8 +81,13 @@ namespace Backend.Controllers List KeyValue = new List(); try { - var sqlString = @$"select ms.full_name Name,ms.main_system_guid Value from main_system ms where ms.deleted = 0 and ms.status = 0 ORDER BY ms.priority ASC"; - KeyValue = await backendRepository.GetAllAsync(sqlString); + var sqlString = @$"select system_key Name, system_value Value + from variable + where deleted = 0 and system_type = @main_system_type + ORDER BY system_priority ASC"; + + var param = new { main_system_type = main_system_type }; + KeyValue = await backendRepository.GetAllAsync(sqlString, param); apiResult.Code = "0000"; apiResult.Data = KeyValue; @@ -96,14 +108,16 @@ namespace Backend.Controllers List KeyValue = new List(); try { + var mainList = await backendRepository.GetAllAsync("select id from variable where system_value = @main_system_tag and system_type = @main_system_type", new { main_system_tag = post.main_system_tag, main_system_type = main_system_type}); var sqlString = @$"select - ss.sub_system_guid value,ss.full_name name - from sub_system ss - left join ( - select * from building_menu bm where bm.building_guid = '{post.build}') bm - on ss.sub_system_guid = bm.sub_system_guid - where bm.sub_system_guid is null and ss.deleted = 0 and ss.status = 0 and ss.main_system_guid = @guid ORDER BY ss.priority ASC, ss.created_at DESC"; - KeyValue = await backendRepository.GetAllAsync(sqlString, new { guid = post.main }); + sv.system_value value, sv.system_key name + from variable sv + left join ( + select * from building_menu bm where bm.building_tag = @building_tag + ) bm + on sv.system_value = bm.sub_system_tag + where bm.sub_system_tag is null and sv.deleted = 0 and sv.system_parent_id in @mainList ORDER BY sv.system_priority ASC, sv.created_at DESC"; + KeyValue = await backendRepository.GetAllAsync(sqlString, new { building_tag = post.building_tag, mainList = mainList}); apiResult.Code = "0000"; apiResult.Data = KeyValue; @@ -125,58 +139,103 @@ namespace Backend.Controllers ApiResult apiResult = new ApiResult(); try { - var get = await backendRepository.GetOneAsync("building_menu", $"building_guid = '{buildMenu.building_guid}' and main_system_guid = '{buildMenu.main_system_guid}' and sub_system_guid = '{buildMenu.sub_system_guid}'"); + var get = await backendRepository.GetOneAsync("building_menu", $"building_tag = '{buildMenu.building_tag}' and main_system_tag = '{buildMenu.main_system_tag}' and sub_system_tag = '{buildMenu.sub_system_tag}'"); if (get == null) { + var subV = await backendRepository.GetOneAsync("variable", "system_value = @sub_tag and system_type = @sub_system_type", new { sub_tag = buildMenu.sub_system_tag, sub_system_type = sub_system_type }); + var dictionary = new Dictionary() { - {"@building_guid", buildMenu.building_guid}, - {"@main_system_guid",buildMenu.main_system_guid }, - {"@sub_system_guid", buildMenu.sub_system_guid}, - {"@drawing",buildMenu.drawing }, + {"@building_tag", buildMenu.building_tag}, + {"@main_system_tag",buildMenu.main_system_tag }, + {"@sub_system_tag", buildMenu.sub_system_tag}, + {"@left_drawing",buildMenu.left_drawing }, + {"@right_drawing",buildMenu.right_drawing }, {"@created_by",myUserInfo.Userinfo_guid }, - {"@planimetric_click",buildMenu.planimetric_click} + {"@left_planimetric_click",buildMenu.left_planimetric_click}, + {"@right_planimetric_click",buildMenu.right_planimetric_click} }; - if (buildMenu.drawing == 2) + if (buildMenu.left_drawing == 2) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port - var building_where = @"deleted = 0 AND building_guid = @Building_guid"; - var building = await backendRepository.GetOneAsync("building", building_where, new { Building_guid = buildMenu.building_guid }); + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@system_url", buildMenu.system_url); + dictionary.Add("@left_system_url", buildMenu.left_system_url); } - else if (buildMenu.drawing == 4) + else if (buildMenu.left_drawing == 4) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port - var building_where = @"deleted = 0 AND building_guid = @Building_guid"; - var building = await backendRepository.GetOneAsync("building", building_where, new { Building_guid = buildMenu.building_guid }); + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@riser_diagram_url", buildMenu.riser_diagram_url); - dictionary.Add("@icon_click", buildMenu.icon_click); - dictionary.Add("@icon_click_url", buildMenu.icon_click_url); - dictionary.Add("@icon_click_url_width", buildMenu.icon_click_url_width); - dictionary.Add("@icon_click_url_height", buildMenu.icon_click_url_height); + dictionary.Add("@left_riser_diagram_url", buildMenu.left_riser_diagram_url); + dictionary.Add("@left_icon_click", buildMenu.left_icon_click); + dictionary.Add("@left_icon_click_url", buildMenu.left_icon_click_url); + dictionary.Add("@left_icon_click_url_width", buildMenu.left_icon_click_url_width); + dictionary.Add("@left_icon_click_url_height", buildMenu.left_icon_click_url_height); } - else if (buildMenu.drawing == 1) + else if (buildMenu.left_drawing == 1) { - dictionary.Add("@planimetric_floor_guid", buildMenu.planimetric_floor_guid); + dictionary.Add("@planimetric_floor_guid", buildMenu.left_planimetric_floor_guid); + } + + if (buildMenu.right_drawing == 2) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_system_url", buildMenu.right_system_url); + } + else if (buildMenu.right_drawing == 4) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_riser_diagram_url", buildMenu.right_riser_diagram_url); + dictionary.Add("@right_icon_click", buildMenu.right_icon_click); + dictionary.Add("@right_icon_click_url", buildMenu.right_icon_click_url); + dictionary.Add("@right_icon_click_url_width", buildMenu.right_icon_click_url_width); + dictionary.Add("@right_icon_click_url_height", buildMenu.right_icon_click_url_height); + } + else if (buildMenu.right_drawing == 1) + { + dictionary.Add("@right_planimetric_floor_guid", buildMenu.right_planimetric_floor_guid); } await backendRepository.AddOneByCustomTable(dictionary, "building_menu"); - var max = await backendRepository.GetOneAsync("select Max(CONVERT(int,SUBSTRING(AuthCode,2,5))) AuthCode from auth_page ap where ap.AuthCode like 'F%'"); - var page = await backendRepository.GetOneAsync($"select ss.full_name SubName,ms.full_name MainName from sub_system ss left join main_system ms on ms.main_system_guid = ss.main_system_guid where ss.sub_system_guid = '{buildMenu.sub_system_guid}' and ms.main_system_guid = '{buildMenu.main_system_guid}'"); + var max = await backendRepository.GetOneAsync("select Max(CONVERT(SUBSTRING(AuthCode,2,5), SIGNED)) AuthCode from auth_page ap where ap.AuthCode like 'F%'"); + + var pageSql = $@"select sv.system_key SubName, mv.system_key MainName + from variable sv + left join variable mv on sv.system_parent_id = mv.id + where (sv.system_value = @sub_system_tag and sv.system_type = @sub_system_type) and (mv.system_value = @main_system_tag and mv.system_type = @main_system_type)"; + var pageParam = new { sub_system_tag = buildMenu.sub_system_tag, main_system_tag = buildMenu.main_system_tag, sub_system_type = sub_system_type, main_system_type = main_system_type}; + var page = await backendRepository.GetOneAsync(pageSql, pageParam); var pagedictionary = new Dictionary() { @@ -184,42 +243,26 @@ namespace Backend.Controllers {"@AuthType", 1 }, {"@MainName", page.MainName}, {"@SubName",page.SubName}, - {"@building_guid",buildMenu.building_guid}, - {"@ShowView",buildMenu.sub_system_guid} + {"@building_tag",buildMenu.building_tag}, + {"@ShowView",subV.id} }; await backendRepository.AddOneByCustomTable(pagedictionary, "auth_page"); + var param = new { main_system_type = main_system_type, sub_system_type = sub_system_type }; await backendRepository.ExecuteSql(@"DELETE FROM auth_page - WHERE auth_page.AuthCode like 'F%'; - INSERT INTO auth_page (AuthCode,AuthType,MainName,SubName,building_guid,ShowView) - SELECT 'F' + CONVERT(varchar,ROW_NUMBER() OVER(ORDER BY bm.building_guid ASC)) AuthCode,'1' AuthType,ms.full_name MainName,ss.full_name SubName,bm.building_guid,bm.sub_system_guid ShowView FROM building_menu bm - left join main_system ms on ms.main_system_guid = bm.main_system_guid - left join sub_system ss on ss.sub_system_guid = bm.sub_system_guid"); + WHERE auth_page.AuthCode like 'F%'; + INSERT INTO auth_page (AuthCode,AuthType,MainName,SubName,building_tag,ShowView) + SELECT concat('F', CONVERT(ROW_NUMBER() OVER(ORDER BY bm.building_tag ASC), nchar)) AuthCode, '1' as AuthType, + mv.system_key MainName, sv.system_key SubName, bm.building_tag, sv.id ShowView + FROM building_menu bm + LEFT JOIN variable mv ON bm.main_system_tag = mv.system_value AND mv.system_type = @main_system_type + LEFT JOIN variable sv ON bm.sub_system_tag = sv.system_value AND sv.system_type = @sub_system_type", param); await backendRepository.ExecuteSql(@"delete a from role_auth a join role b on a.role_guid = b.role_guid where b.layer = 0; INSERT INTO role_auth (role_guid,AuthCode,created_by) SELECT r.role_guid,ap.AuthCode,'0' created_by FROM auth_page ap,role r WHERE r.layer = 0;"); - #region 新增至派送資料表 - var sql = $@"SELECT ra.* FROM role_auth ra join role r on ra.role_guid = r.role_guid where r.layer = 0"; - var role_auths = await backendRepository.GetAllAsync(sql); - - List> role_auth_dicts = new List>(); - foreach (var role_auth in role_auths) - { - Dictionary role_auth_dict = new Dictionary() - { - { "role_guid", role_auth.Role_guid}, - { "@AuthCode", role_auth.AuthCode}, - }; - - role_auth_dicts.Add(role_auth_dict); - } - - await backendRepository.ManualInsertBackgroundServiceTask("", "", "role_auth", "purge_specify_insert", role_auth_dicts); - #endregion - apiResult.Code = "0000"; apiResult.Msg = "儲存成功"; } @@ -227,47 +270,85 @@ namespace Backend.Controllers { var dictionary = new Dictionary() { - {"@drawing",buildMenu.drawing }, + {"@left_drawing",buildMenu.left_drawing }, + {"@right_drawing",buildMenu.right_drawing }, {"@updated_by",myUserInfo.Userinfo_guid }, {"@updated_at",DateTime.Now }, - {"@planimetric_click",buildMenu.planimetric_click} + {"@left_planimetric_click",buildMenu.left_planimetric_click}, + {"@right_planimetric_click",buildMenu.right_planimetric_click} }; - if (buildMenu.drawing == 2) + + if (buildMenu.left_drawing == 2) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port - var building_where = @"deleted = 0 AND building_guid = @Building_guid"; - var building = await backendRepository.GetOneAsync("building", building_where, new { Building_guid = buildMenu.building_guid }); + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@system_url", buildMenu.system_url); + dictionary.Add("@left_system_url", buildMenu.left_system_url); } - else if (buildMenu.drawing == 4) + else if (buildMenu.left_drawing == 4) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port - var building_where = @"deleted = 0 AND building_guid = @Building_guid"; - var building = await backendRepository.GetOneAsync("building", building_where, new { Building_guid = buildMenu.building_guid }); + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@riser_diagram_url", buildMenu.riser_diagram_url); - dictionary.Add("@icon_click", buildMenu.icon_click); - dictionary.Add("@icon_click_url", buildMenu.icon_click_url); - dictionary.Add("@icon_click_url_width", buildMenu.icon_click_url_width); - dictionary.Add("@icon_click_url_height", buildMenu.icon_click_url_height); + dictionary.Add("@left_riser_diagram_url", buildMenu.left_riser_diagram_url); + dictionary.Add("@left_icon_click", buildMenu.left_icon_click); + dictionary.Add("@left_icon_click_url", buildMenu.left_icon_click_url); + dictionary.Add("@left_icon_click_url_width", buildMenu.left_icon_click_url_width); + dictionary.Add("@left_icon_click_url_height", buildMenu.left_icon_click_url_height); } - else if (buildMenu.drawing == 1) + else if (buildMenu.left_drawing == 1) { - dictionary.Add("@planimetric_floor_guid", buildMenu.planimetric_floor_guid); + dictionary.Add("@left_planimetric_floor_guid", buildMenu.left_planimetric_floor_guid); } - await backendRepository.UpdateOneByCustomTable(dictionary, "building_menu", $"building_guid = '{buildMenu.building_guid}' and main_system_guid = '{buildMenu.main_system_guid}' and sub_system_guid = '{buildMenu.sub_system_guid}'"); + if (buildMenu.right_drawing == 2) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_system_url", buildMenu.right_system_url); + } + else if (buildMenu.right_drawing == 4) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_riser_diagram_url", buildMenu.right_riser_diagram_url); + dictionary.Add("@right_icon_click", buildMenu.right_icon_click); + dictionary.Add("@right_icon_click_url", buildMenu.right_icon_click_url); + dictionary.Add("@right_icon_click_url_width", buildMenu.right_icon_click_url_width); + dictionary.Add("@right_icon_click_url_height", buildMenu.right_icon_click_url_height); + } + else if (buildMenu.right_drawing == 1) + { + dictionary.Add("@right_planimetric_floor_guid", buildMenu.right_planimetric_floor_guid); + } + + await backendRepository.UpdateOneByCustomTable(dictionary, "building_menu", $"building_tag = '{buildMenu.building_tag}' and main_system_tag = '{buildMenu.main_system_tag}' and sub_system_tag = '{buildMenu.sub_system_tag}'"); apiResult.Code = "0000"; apiResult.Msg = "儲存成功"; @@ -291,15 +372,20 @@ namespace Backend.Controllers try { buildMenuTables = await backendRepository.GetAllAsync($@"select bm.*, - case drawing when 1 then '樓層平面圖' when 2 then '系統圖' when 4 then '昇位圖' end drawing_name, - case icon_click when 1 then '開' when 0 then '關' end icon_click_name, - case planimetric_click when 1 then '開' when 0 then '關' end planimetric_click_name, - ms.full_name main_system_guid_name, ss.full_name sub_system_guid_name,ff.full_name floor_guid_name - from building_menu bm - left join main_system ms on ms.main_system_guid = bm.main_system_guid - left join sub_system ss on ss.sub_system_guid = bm.sub_system_guid - left join floor ff on ff.floor_guid = bm.planimetric_floor_guid - where bm.building_guid = '{post.build}' and bm.main_system_guid in @MainList ORDER BY ms.priority ASC, ss.priority ASC, ss.created_at DESC ", new { MainList = post.MainList }); + case left_drawing when 1 then '樓層平面圖' when 2 then '系統圖' when 4 then '昇位圖' end left_drawing_name, + case left_icon_click when 1 then '開' when 0 then '關' end left_icon_click_name, + case left_planimetric_click when 1 then '開' when 0 then '關' end left_planimetric_click_name, + case right_drawing when 1 then '樓層平面圖' when 2 then '系統圖' when 4 then '昇位圖' end right_drawing_name, + case right_icon_click when 1 then '開' when 0 then '關' end right_icon_click_name, + case right_planimetric_click when 1 then '開' when 0 then '關' end right_planimetric_click_name, + mv.system_key main_system_guid_name, sv.system_key sub_system_guid_name,lf.full_name left_floor_guid_name, rf.full_name right_floor_guid_name + from building_menu bm + left join variable mv on bm.main_system_tag = mv.system_value and mv.system_type = @main_system_type and mv.deleted = 0 + left join variable sv on bm.sub_system_tag = sv.system_value and sv.system_type = @sub_system_type and sv.deleted = 0 + left join floor lf on lf.floor_guid = bm.left_planimetric_floor_guid + left join floor rf on rf.floor_guid = bm.right_planimetric_floor_guid + where bm.building_tag = @building_tag and bm.main_system_tag in @MainList ORDER BY mv.system_priority ASC, sv.system_priority ASC, sv.created_at DESC ", + new { building_tag = post.building_tag, MainList = post.MainList, main_system_type = main_system_type, sub_system_type = sub_system_type }); apiResult.Code = "0000"; apiResult.Data = buildMenuTables; @@ -324,9 +410,11 @@ namespace Backend.Controllers try { var BuildMenu = await backendRepository.GetOneAsync( - $@"select *,ss.full_name sub_system_guid_name from building_menu bm - left join sub_system ss on bm.sub_system_guid = ss.sub_system_guid - where bm.building_guid = @bg and bm.main_system_guid = @msg and bm.sub_system_guid = @ssg", new { bg = post.build, msg = post.main, ssg = post.sub }); + $@"select bm.*, sv.system_key sub_system_guid_name + from building_menu bm + left join variable sv on bm.sub_system_tag = sv.system_value and sv.system_type = @sub_system_type + where bm.building_tag = @building_tag and bm.main_system_tag = @main_system_tag and bm.sub_system_tag = @sub_system_tag" + , new { building_tag = post.building_tag, main_system_tag = post.main_system_tag, sub_system_tag = post.sub_system_tag, sub_system_type = sub_system_type }); apiResult.Code = "0000"; apiResult.Data = BuildMenu; } @@ -346,8 +434,9 @@ namespace Backend.Controllers ApiResult apiResult = new ApiResult(); try { - await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("building_menu", $"building_guid = '{post.build}' and main_system_guid = '{post.main}' and sub_system_guid = '{post.sub}'"); - var authcode = await backendRepository.GetOneAsync(@$"select AuthCode from auth_page where building_guid = '{post.build}' and ShowView = '{post.sub}'"); + await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("building_menu", $"building_tag = '{post.building_tag}' and main_system_tag = '{post.main_system_tag}' and sub_system_tag = '{post.sub_system_tag}'"); + var subV = await backendRepository.GetOneAsync(@$"select * from variable where system_value = @sub_system_tag and system_type = @sub_system_type and deleted = 0", new { sub_system_tag = post.sub_system_tag, sub_system_type = sub_system_type }); + var authcode = await backendRepository.GetOneAsync(@$"select AuthCode from auth_page where building_tag = @building_tag and ShowView = @sub_id", new {post.building_tag, subV.id}); if (authcode != null) { await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("role_auth", $" AuthCode = '{authcode}'"); @@ -356,25 +445,6 @@ namespace Backend.Controllers INSERT INTO role_auth (role_guid,AuthCode,created_by) SELECT r.role_guid,ap.AuthCode,'0' created_by FROM auth_page ap,role r WHERE r.layer = 0;"); - - #region 新增至派送資料表 - var sql = $@"SELECT ra.* FROM role_auth ra join role r on ra.role_guid = r.role_guid where r.layer = 0"; - var role_auths = await backendRepository.GetAllAsync(sql); - - List> role_auth_dicts = new List>(); - foreach (var role_auth in role_auths) - { - Dictionary role_auth_dict = new Dictionary() - { - { "role_guid", role_auth.Role_guid}, - { "@AuthCode", role_auth.AuthCode}, - }; - - role_auth_dicts.Add(role_auth_dict); - } - - await backendRepository.ManualInsertBackgroundServiceTask("", "", "role_auth", "purge_specify_insert", role_auth_dicts); - #endregion } apiResult.Code = "0000"; apiResult.Msg = "刪除成功"; @@ -396,13 +466,18 @@ namespace Backend.Controllers ApiResult> apiResult = new ApiResult>(); try { + var param = new { building_tag = post.building_tag, main_system_tag = post.main_system_tag, sub_system_tag = post.sub_system_tag, main_system_type = main_system_type, sub_system_type = sub_system_type }; buildMenuFloorTables = await backendRepository.GetAllAsync($@" - select f.full_name floor_guid_name,sf.*,ms.full_name main_system_guid_name,ss.full_name sub_system_guid_name - from (select * from sub_system_floor ssf where ssf.building_guid = '{post.build}' and ssf.main_system_guid = '{post.main}' and ssf.sub_system_guid = '{post.sub}' and deleted = 0 and status = 0) sf - left join floor f on sf.floor_guid = f.floor_guid - left join main_system ms on ms.main_system_guid = sf.main_system_guid - left join sub_system ss on ss.sub_system_guid = sf.sub_system_guid - ORDER BY ms.priority, ss.priority, f.priority"); + select sf.id sub_system_floor_id, f.full_name floor_guid_name, sf.*, mv.system_key main_system_guid_name, sv.system_key sub_system_guid_name + from ( + select * + from sub_system_floor ssf + where ssf.building_tag = @building_tag and ssf.main_system_tag = @main_system_tag and ssf.sub_system_tag = @sub_system_tag and deleted = 0 and status = 0 + ) sf + left join floor f on sf.floor_tag = f.full_name and sf.building_tag = f.building_tag + left join variable mv on sf.main_system_tag = mv.system_value and mv.system_type = @main_system_type and mv.deleted = 0 + left join variable sv on sf.sub_system_tag = sv.system_value and sv.system_type = @sub_system_type and sv.deleted = 0 + ORDER BY mv.system_priority, sv.system_priority, f.priority", param); apiResult.Code = "0000"; apiResult.Data = buildMenuFloorTables; } @@ -426,12 +501,17 @@ namespace Backend.Controllers List KeyValue = new List(); try { - var sqlString = @$"select fg.floor_guid value, fg.full_name name from - (select * from floor fg where fg.building_guid = '{post.build}' and fg.deleted = 0 and fg.status = 0 ) fg - left join (select * from sub_system_floor where building_guid = '{post.build}' and main_system_guid = '{post.main}' and sub_system_guid = '{post.sub}' and deleted = 0 and status = 0) ssf - on ssf.floor_guid = fg.floor_guid - where ssf.floor_guid is null ORDER BY fg.priority"; - KeyValue = await backendRepository.GetAllAsync(sqlString); + var param = new { building_tag = post.building_tag, main_system_tag = post.main_system_tag, sub_system_tag = post.sub_system_tag }; + var sqlString = @$"select f.floor_guid value, f.full_name name + from ( + select * from floor f where f.building_tag = @building_tag and f.deleted = 0 and f.status = 0 + ) f + left join ( + select * from sub_system_floor where building_tag = @building_tag and main_system_tag = @main_system_tag and sub_system_tag = @sub_system_tag and deleted = 0 and status = 0 + ) ssf + on ssf.floor_tag = f.full_name + where ssf.floor_tag is null ORDER BY f.priority"; + KeyValue = await backendRepository.GetAllAsync(sqlString, param); apiResult.Code = "0000"; apiResult.Data = KeyValue; @@ -457,11 +537,11 @@ namespace Backend.Controllers { var dictionary = new Dictionary() { - {"@sub_system_floor_guid", Guid.NewGuid()}, - {"@building_guid",menuInfloor.build}, - {"@main_system_guid", menuInfloor.main}, - {"@sub_system_guid",menuInfloor.sub}, - {"@floor_guid",a}, + {"@building_tag", menuInfloor.building_tag}, + {"@main_system_tag", menuInfloor.main_system_tag}, + {"@sub_system_tag",menuInfloor.sub_system_tag}, + {"@floor_tag", a}, + {"@is_link", 1}, {"@created_by", myUserInfo.Userinfo_guid} }; listdictionary.Add(dictionary); @@ -481,32 +561,32 @@ namespace Backend.Controllers return apiResult; } [HttpPost] - public async Task> DeleteBuildFloorMenu(string subfloorguid) + public async Task> DeleteBuildFloorMenu(string sub_system_floor_id) { ApiResult apiResult = new ApiResult(); try { //檢查該樓層底下是否有設備 - var sql = $@" - SELECT - CONCAT(b.full_name, ' - ', ms.full_name, ' - ', ss.full_name , ' - ', f.full_name) - FROM device d - LEFT JOIN ( - SELECT * - FROM sub_system_floor ssf - WHERE ssf.deleted = 0 AND ssf.sub_system_floor_guid = @Guid) ssf - ON d.deleted = 0 - AND d.building_guid = ssf.building_guid - AND d.main_system_guid = ssf.main_system_guid - AND d.sub_system_guid = ssf.sub_system_guid - AND d.floor_guid = ssf.floor_guid - LEFT JOIN building b ON b.deleted = 0 AND d.building_guid = b.building_guid - LEFT JOIN main_system ms ON ms.deleted = 0 AND d.main_system_guid = ms.main_system_guid - LEFT JOIN sub_system ss ON ss.deleted = 0 AND d.sub_system_guid = ss.sub_system_guid - LEFT JOIN floor f ON f.deleted = 0 AND d.floor_guid = f.floor_guid - WHERE ssf.sub_system_floor_guid = @Guid"; + var sql = $@"SELECT + CONCAT(b.full_name, ' - ', mv.system_key, ' - ', sv.system_key, ' - ', f.full_name) + FROM device d + LEFT JOIN ( + SELECT * + FROM sub_system_floor ssf + WHERE ssf.deleted = 0 AND ssf.id = @sub_system_floor_id + ) ssf + ON d.deleted = 0 + AND d.device_building_tag = ssf.building_tag + AND d.device_system_tag = ssf.main_system_tag + AND d.device_name_tag = ssf.sub_system_tag + AND d.device_floor_tag = ssf.floor_tag + LEFT JOIN building b ON b.deleted = 0 AND d.device_building_tag = b.building_tag + LEFT JOIN variable mv on mv.deleted = 0 AND d.device_system_tag = mv.system_value AND mv.system_type = @main_system_type and mv.deleted = 0 + LEFT JOIN variable sv on sv.deleted = 0 AND d.device_name_tag = sv.system_value AND sv.system_type = @sub_system_type and sv.deleted = 0 + LEFT JOIN floor f ON f.deleted = 0 AND d.full_name = f.full_name + WHERE ssf.id = @sub_system_floor_id"; - var sub_system_floors = await backendRepository.GetAllAsync(sql, new { Guid = subfloorguid }); + var sub_system_floors = await backendRepository.GetAllAsync(sql, new { sub_system_floor_id = sub_system_floor_id, main_system_type = main_system_type, sub_system_type = sub_system_type }); if (sub_system_floors.Count > 0) { apiResult.Code = "9997"; @@ -514,7 +594,7 @@ namespace Backend.Controllers return apiResult; } - await backendRepository.DeleteOne(subfloorguid, "sub_system_floor", "sub_system_floor_guid"); + await backendRepository.DeleteOne(sub_system_floor_id, "sub_system_floor", "id"); apiResult.Code = "0000"; apiResult.Msg = "刪除成功"; } @@ -522,7 +602,7 @@ namespace Backend.Controllers { apiResult.Code = "9999"; apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; - string json = System.Text.Json.JsonSerializer.Serialize(subfloorguid); + string json = System.Text.Json.JsonSerializer.Serialize(sub_system_floor_id); Logger.LogError("【" + controllerName + "/" + actionName + "】" + json); Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -536,10 +616,12 @@ namespace Backend.Controllers List KeyValue = new List(); try { - var sqlString = @$"select floor.floor_guid Value,floor.full_name Name from sub_system_floor sf left join floor on sf.floor_guid = floor.floor_guid - where sf.deleted = 0 and sf.status = 0 and sf.building_guid = '{post.build}' and sf.main_system_guid = '{post.main}' and sf.sub_system_guid = '{post.sub}' - ORDER BY floor.priority, floor.created_at"; - KeyValue = await backendRepository.GetAllAsync(sqlString); + var sqlString = @$"select f.floor_guid Value, f.full_name Name + from sub_system_floor sf + left join floor f on sf.floor_tag = f.full_name + where sf.deleted = 0 and sf.status = 0 and sf.building_tag = @building_tag and sf.main_system_tag = @main_system_tag and sf.sub_system_tag = @sub_system_tag + ORDER BY f.priority, f.created_at"; + KeyValue = await backendRepository.GetAllAsync(sqlString, new { building_tag = post.building_tag, main_system_tag = post.main_system_tag, sub_system_type = post.sub_system_tag }); apiResult.Code = "0000"; apiResult.Data = KeyValue; diff --git a/Backend/Controllers/DeviceManageController.cs b/Backend/Controllers/DeviceManageController.cs index 701cdbf..511a74f 100644 --- a/Backend/Controllers/DeviceManageController.cs +++ b/Backend/Controllers/DeviceManageController.cs @@ -46,81 +46,82 @@ namespace Backend.Controllers //取得區域選單 var sql = $@"SELECT - bm.*, - b.full_name AS bFull_name, - b.priority AS bPriority, - ms.full_name AS mFull_name, - ms.priority AS mPriority, - ss.full_name AS sFull_name, - ss.priority AS sPriority + bm.*, + b.full_name AS bFull_name, + b.priority AS bPriority, + mv.system_key AS mFull_name, + mv.system_priority AS mPriority, + sv.system_key AS sFull_name, + sv.system_priority AS sPriority FROM building_menu bm - LEFT JOIN building b ON bm.building_guid = b.building_guid AND b.deleted = 0 - LEFT JOIN main_system ms ON bm.main_system_guid = ms.main_system_guid AND ms.deleted = 0 - LEFT JOIN sub_system ss ON bm.sub_system_guid = ss.sub_system_guid AND ss.deleted = 0"; + LEFT JOIN building b ON bm.building_tag = b.building_tag AND b.deleted = 0 + LEFT JOIN variable mv ON bm.main_system_tag = mv.system_value AND mv.deleted = 0 + LEFT JOIN variable sv ON bm.sub_system_tag = sv.system_value AND sv.deleted = 0"; if (!string.IsNullOrEmpty(filter)) { sql += $@" WHERE ( b.full_name LIKE CONCAT('%', @Filter, '%') - OR ms.full_name LIKE CONCAT('%', @Filter, '%') - OR ss.full_name LIKE CONCAT('%', @Filter, '%') + OR mv.system_key LIKE CONCAT('%', @Filter, '%') + OR sv.system_key LIKE CONCAT('%', @Filter, '%') )"; } - sql += $@" ORDER BY b.priority, ms.priority, ss.priority, ss.created_at DESC"; + sql += $@" ORDER BY b.priority, mv.system_priority, sv.system_priority, sv.created_at DESC"; var buildingMenuRawDatas = await backendRepository.GetAllAsync(sql, new { Filter = filter }); //取得系統小類樓層 var sub_sql = $@"SELECT - ssf.*, - f.full_name AS fFull_name, - f.InitMapName, - f.floor_map_name, - f.priority AS fPriority + ssf.*, + f.full_name AS fFull_name, + f.InitMapName, + f.floor_map_name, + f.priority AS fPriority FROM sub_system_floor ssf - LEFT JOIN floor f ON ssf.floor_guid = f.floor_guid AND f.deleted = 0 + LEFT JOIN floor f ON ssf.floor_tag = f.full_name AND ssf.building_tag = f.building_tag AND f.deleted = 0 WHERE ssf.deleted = 0 - ORDER BY f.priority, f.created_at"; + ORDER BY f.priority, f.created_at +"; var subSystemFloorRawDatas = await backendRepository.GetAllAsync(sub_sql); - var buildingMenu_Group_Building_guid = buildingMenuRawDatas.GroupBy(x => x.Building_guid).ToList(); + var buildingMenu_Group_Building_tag = buildingMenuRawDatas.GroupBy(x => x.building_tag).ToList(); List buildingCollapses = new List(); - foreach (var buildingMenus_Building_guid in buildingMenu_Group_Building_guid) + foreach (var buildingMenus_Building_tag in buildingMenu_Group_Building_tag) { BuildingCollapse buildingCollapse = new BuildingCollapse(); - buildingCollapse.Building_guid = buildingMenus_Building_guid.Key; - buildingCollapse.Full_name = buildingMenus_Building_guid.First().bFull_name; + buildingCollapse.Building_tag = buildingMenus_Building_tag.Key; + buildingCollapse.Full_name = buildingMenus_Building_tag.First().bFull_name; buildingCollapse.Main_systems = new List(); - var buildingMenus_Group_Main_system_guid = buildingMenus_Building_guid.GroupBy(x => x.Main_system_guid).ToList(); + var buildingMenus_Group_Main_system_tag = buildingMenus_Building_tag.GroupBy(x => x.main_system_tag).ToList(); - foreach (var buildingMenus_Main_system_guid in buildingMenus_Group_Main_system_guid) + foreach (var buildingMenus_Main_system_tag in buildingMenus_Group_Main_system_tag) { Main_system main_System = new Main_system(); - main_System.Main_system_guid = buildingMenus_Main_system_guid.Key; - main_System.Full_name = buildingMenus_Main_system_guid.First().mFull_name; + main_System.Main_system_tag = buildingMenus_Main_system_tag.Key; + main_System.Full_name = buildingMenus_Main_system_tag.First().mFull_name; main_System.Sub_systems = new List(); - var buildingMenus_Group_Sub_system_guid = buildingMenus_Main_system_guid.GroupBy(x => x.Sub_system_guid).ToList(); + var buildingMenus_Group_Sub_system_tag = buildingMenus_Main_system_tag.GroupBy(x => x.sub_system_tag).ToList(); - foreach (var buildingMenus_Sub_system_guid in buildingMenus_Group_Sub_system_guid) + foreach (var buildingMenus_Sub_system_tag in buildingMenus_Group_Sub_system_tag) { Sub_system sub_System = new Sub_system(); - sub_System.Sub_system_guid = buildingMenus_Sub_system_guid.Key; - sub_System.Full_name = buildingMenus_Sub_system_guid.First().sFull_name; + sub_System.Sub_system_tag = buildingMenus_Sub_system_tag.Key; + sub_System.Full_name = buildingMenus_Sub_system_tag.First().sFull_name; sub_System.Floors = new List(); - var floorRawDatas = subSystemFloorRawDatas.Where(x => x.Building_guid == buildingCollapse.Building_guid - && x.Main_system_guid == main_System.Main_system_guid - && x.Sub_system_guid == sub_System.Sub_system_guid).ToList(); + var floorRawDatas = subSystemFloorRawDatas.Where(x => x.building_tag == buildingCollapse.Building_tag + && x.main_system_tag == main_System.Main_system_tag + && x.sub_system_tag == sub_System.Sub_system_tag).ToList(); foreach (var floorRawData in floorRawDatas) { Floor floor = new Floor(); - floor.Floor_guid = floorRawData.Floor_guid; + floor.Floor_tag = floorRawData.Floor_tag; floor.Full_name = floorRawData.fFull_name; floor.InitMapName = floorRawData.InitMapName; floor.Floor_map_name = floorRawData.Floor_map_name; @@ -164,48 +165,50 @@ namespace Backend.Controllers { var sql = $@"SELECT - d.*, - d.full_name AS Device_full_name, - b.full_name AS Building_full_name, - ms.full_name AS Main_system_full_name, - ss.full_name AS Sub_system_full_name, - f.full_name AS Floor_full_name, - dk.device_image, - CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url, - dk.device_close_color, - dk.device_normal_color, - dk.device_error_color, - dk.device_normal_flashing, - dk.device_close_flashing, - dk.device_error_flashing, - (SELECT - STRING_AGG( ISNULL(system_key, ' '), ',') - FROM device_disaster dd - JOIN variable v ON v.deleted = 0 AND v.system_type = 'disaster' AND v.system_value = dd.device_system_value - WHERE dd.device_guid = d.device_guid - ) AS Device_disaster_type_text - FROM ( - SELECT * - FROM device d - WHERE - d.building_guid = @Building_guid - AND d.main_system_guid = @Main_system_guid - AND d.sub_system_guid = @Sub_system_guid - AND d.floor_guid = @Floor_guid - AND d.deleted = 0 - ) d - JOIN building b ON d.building_guid = b.building_guid - JOIN main_system ms ON d.main_system_guid = ms.main_system_guid - JOIN sub_system ss ON d.sub_system_guid = ss.sub_system_guid - JOIN floor f ON d.floor_guid = f.floor_guid - LEFT JOIN device_kind dk ON dk.device_building_tag = d.device_building_tag - AND dk.device_system_tag = d.device_system_tag - -- AND dk.device_floor_tag = d.device_floor_tag - AND dk.device_name_tag = d.device_name_tag - ORDER BY d.priority ASC, d.device_number ASC - "; - - var devices = await backendRepository.GetAllAsync(sql, post); + d.*, + d.device_last_name AS Device_full_name, + b.full_name AS Building_full_name, + mv.system_key AS Main_system_full_name, + sv.system_key AS Sub_system_full_name, + f.full_name AS Floor_full_name, + dk.device_image, + CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url, + dk.device_close_color, + dk.device_normal_color, + dk.device_error_color, + dk.device_normal_flashing, + dk.device_close_flashing, + dk.device_error_flashing, + (SELECT + GROUP_CONCAT( IFNULL(system_key, ' '), ',') + FROM device_disaster dd + JOIN variable v ON v.deleted = 0 AND v.system_type = 'disaster' AND v.system_value = dd.device_system_value + WHERE dd.device_guid = d.device_guid + ) AS Device_disaster_type_text + FROM ( + SELECT * + FROM device d + WHERE d.device_building_tag = @building_tag + AND d.device_system_tag = @main_system_tag + AND d.device_name_tag = @sub_system_tag + AND d.device_floor_tag = @floor_tag + AND d.deleted = 0 + ) d + JOIN building b ON d.device_building_tag = b.building_tag + JOIN variable mv ON d.device_system_tag = mv.system_value AND mv.system_type = @main_system_type + JOIN variable sv ON d.device_name_tag = sv.system_value AND sv.system_type = @sub_system_type + JOIN floor f ON d.device_floor_tag = f.full_name AND d.device_building_tag = f.building_tag + LEFT JOIN device_kind dk ON dk.device_building_tag = d.device_building_tag AND dk.device_system_tag = d.device_system_tag AND dk.device_name_tag = d.device_name_tag + ORDER BY d.priority ASC, d.device_number ASC"; + + var devices = await backendRepository.GetAllAsync(sql, new { + building_tag = post.building_tag, + main_system_tag = post.device_system_tag, + sub_system_tag = post.device_name_tag, + floor_tag = post.device_floor_tag, + main_system_type = main_system_type, + sub_system_type = sub_system_type + }); var sql_node = $@"SELECT dn.device_node_guid, @@ -250,8 +253,8 @@ namespace Backend.Controllers d.*, d.full_name AS Device_full_name, b.full_name AS Building_full_name, - ms.full_name AS Main_system_full_name, - ss.full_name AS Sub_system_full_name, + mv.system_key AS Main_system_full_name, + sv.system_key AS Sub_system_full_name, f.full_name AS Floor_full_name FROM ( SELECT * @@ -260,13 +263,13 @@ namespace Backend.Controllers d.device_guid = @Device_guid AND d.deleted = @Deleted ) d - JOIN building b ON d.building_guid = b.building_guid - JOIN main_system ms ON d.main_system_guid = ms.main_system_guid - JOIN sub_system ss ON d.sub_system_guid = ss.sub_system_guid - JOIN floor f ON d.floor_guid = f.floor_guid + JOIN building b ON d.device_building_tag = b.building_tag + JOIN variable mv ON d.device_system_tag = mv.system_value AND mv.system_type = @main_system_type + JOIN variable sv ON d.device_name_tag = sv.system_value AND sv.system_type = @sub_system_type + JOIN floor f ON d.device_floor_tag = f.full_name "; - object param = new { Deleted = 0, Device_guid = guid }; + object param = new { Deleted = 0, Device_guid = guid ,main_system_type = main_system_type , sub_system_type = sub_system_type }; var device = await backendRepository.GetOneAsync(sql, param); @@ -358,10 +361,10 @@ namespace Backend.Controllers Dictionary deviceDic = new Dictionary() { { "@device_guid", guid}, - { "@building_guid", post.Building_guid}, - { "@main_system_guid", post.Main_system_guid}, - { "@sub_system_guid", post.Sub_system_guid}, - { "@floor_guid", post.Floor_guid}, + { "@building_tag", post.Building_tag}, + { "@main_system_tag", post.Main_system_tag}, + { "@sub_system_tag", post.Sub_system_tag}, + { "@floor_guid", post.Floor_tag}, { "@full_name", device_name_tag + device_serial_tag}, { "@device_building_tag", device_building_tag}, { "@device_system_tag", device_system_tag}, @@ -805,7 +808,7 @@ namespace Backend.Controllers try { - var rawDatas = await backendRepository.GetAllAsync("device_import_ckeck_temp", "is_correct = 1 ORDER BY device_building_tag, device_system_tag, device_floor_tag, device_name_tag"); + var rawDatas = await backendRepository.GetAllAsync("import_niagara_tag", null,null,"device_building_tag, device_system_tag, device_floor_tag, device_name_tag"); var rawDatas_Group_Building_tag = rawDatas.GroupBy(x => x.Device_building_tag).ToList(); List tempFilters = new List(); @@ -871,37 +874,35 @@ namespace Backend.Controllers try { - string sql = @"SELECT - di.device_building_tag, - di.device_system_tag, - di.device_floor_tag, - di.device_name_tag, - di.device_serial_tag, - di.device_number, - di.device_system_category_layer3, - STRING_AGG( ISNULL(v.system_value, ' '), ',') AS Device_disasters, - STRING_AGG( ISNULL(v.system_key, ' '), ',') AS Device_disaster_type_text - FROM - (SELECT - * - FROM device_import_ckeck_temp di - WHERE device_building_tag = @Device_building_tag - AND device_system_tag = @Device_system_tag - AND device_floor_tag = @Device_floor_tag - AND device_name_tag = @Device_name_tag - AND is_correct = 1 - AND device_number NOT IN (SELECT d.device_number FROM device d WHERE d.deleted = 0) - ) di - CROSS APPLY STRING_SPLIT(di.device_disaster, ',') dd - LEFT JOIN variable v ON v.system_type = 'disaster' AND v.system_value = dd.value - GROUP BY di.device_building_tag, - di.device_system_tag, - di.device_floor_tag, - di.device_name_tag, - di.device_serial_tag, - di.device_number, - di.device_system_category_layer3"; - + string sql = @"SELECT + di.device_building_tag, + di.device_system_tag, + di.device_floor_tag, + di.device_last_name_tag as device_name_tag, + di.device_serial_tag, + 0 as Device_disasters, + 0 as Device_disaster_type_text, + di.niagara_tags as device_number + FROM + ( + SELECT + * + FROM + import_niagara_tag intag + WHERE + device_building_tag = @Device_building_tag + AND device_system_tag = @Device_system_tag + AND device_floor_tag = @Device_floor_tag + AND device_name_tag = @Device_name_tag + AND convert(intag.niagara_tags, nchar) NOT IN ( SELECT convert(d.device_number, nchar) FROM device d WHERE d.deleted = 0 ) + ) di + GROUP BY + di.device_building_tag, + di.device_system_tag, + di.device_floor_tag, + di.device_last_name_tag, + di.device_serial_tag, + di.niagara_tags"; var deviceImports = await backendRepository.GetAllAsync(sql, post); @@ -931,55 +932,54 @@ namespace Backend.Controllers { var sql = $@"SELECT - dk.device_kind_guid, - dd.device_building_tag, - dd.device_system_tag, - -- dd.device_floor_tag, - dd.device_name_tag, - dk.device_image, - dk.device_normal_text, - dk.device_normal_point_name, - dk.device_normal_point_col, - dk.device_normal_point_value, - dk.device_normal_color, - dk.device_normal_flashing, - dk.device_close_text, - dk.device_close_point_name, - dk.device_close_point_col, - dk.device_close_point_value, - dk.device_close_color, - dk.device_close_flashing, - dk.device_error_text, - dk.device_error_point_name, - dk.device_error_point_col, - dk.device_error_point_value, - dk.device_error_color, - dk.device_error_flashing, - dk.device_error_independent - FROM ( SELECT - d.device_building_tag, - d.device_system_tag, - -- d.device_floor_tag, - d.device_name_tag - FROM ( - SELECT * - FROM device d - WHERE - d.building_guid = @Building_guid - AND d.main_system_guid = @Main_system_guid - AND d.sub_system_guid = @Sub_system_guid - -- AND d.floor_guid = @Floor_guid - AND d.deleted = 0 - ) d - GROUP BY d.device_building_tag, - d.device_system_tag, - -- d.device_floor_tag, - d.device_name_tag) dd - LEFT JOIN device_kind dk ON dd.device_building_tag = dk.device_building_tag - AND dd.device_system_tag = dk.device_system_tag - -- AND dd.device_floor_tag = dk.device_floor_tag - AND dd.device_name_tag = dk.device_name_tag - "; + dk.device_kind_guid, + dd.device_building_tag, + dd.device_system_tag, + -- dd.device_floor_tag, + dd.device_name_tag, + dk.device_image, + dk.device_normal_text, + dk.device_normal_point_name, + dk.device_normal_point_col, + dk.device_normal_point_value, + dk.device_normal_color, + dk.device_normal_flashing, + dk.device_close_text, + dk.device_close_point_name, + dk.device_close_point_col, + dk.device_close_point_value, + dk.device_close_color, + dk.device_close_flashing, + dk.device_error_text, + dk.device_error_point_name, + dk.device_error_point_col, + dk.device_error_point_value, + dk.device_error_color, + dk.device_error_flashing, + dk.device_error_independent + FROM ( SELECT + d.device_building_tag, + d.device_system_tag, + -- d.device_floor_tag, + d.device_name_tag + FROM ( + SELECT * + FROM device d + WHERE + d.device_building_tag = @building_tag + AND d.device_system_tag = @main_system_tag + AND d.device_name_tag = @sub_system_tag + -- AND d.floor_guid = @Floor_tag + AND d.deleted = 0 + ) d + GROUP BY d.device_building_tag, + d.device_system_tag, + -- d.device_floor_tag, + d.device_name_tag) dd + LEFT JOIN device_kind dk ON dd.device_building_tag = dk.device_building_tag + AND dd.device_system_tag = dk.device_system_tag + -- AND dd.device_floor_tag = dk.device_floor_tag + AND dd.device_name_tag = dk.device_name_tag"; var deviceKinds = await backendRepository.GetAllAsync(sql, post); @@ -1259,35 +1259,26 @@ namespace Backend.Controllers private async Task ResetDeviceGroup() { //先刪除整個device_group - var delete_group_sql = @"IF EXISTS(SELECT* FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[device_group]') AND type in (N'U')) - BEGIN - DROP TABLE[dbo].[device_group] - END - - CREATE TABLE [dbo].[device_group]( - [id] [int] IDENTITY(1,1) NOT NULL, - [device_disaster] [varchar](50) NULL, - [device_building_guid] [varchar](36) NULL, - [device_floor_guid] [varchar](36) NULL, - [device_system_category_layer2] [varchar](50) NULL, - [device_system_category_layer3] [varchar](50) NULL, - [device_amount] [int] NOT NULL, - CONSTRAINT [PK_device_group] PRIMARY KEY CLUSTERED - ( - [id] ASC - )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - ) - - ALTER TABLE [dbo].[device_group] ADD CONSTRAINT [DF_device_group_device_amount] DEFAULT ((0)) FOR [device_amount] - "; + var delete_group_sql = @"DROP TABLE IF EXISTS `device_group` ; + CREATE TABLE `device_group` ( + `id` int(11) NOT NULL, + `device_disaster` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '災類', + `device_building_tag` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備東別guid', + `device_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備樓層guid', + `device_area_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備區域', + `device_system_category_layer2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統大類device_system_tag', + `device_system_category_layer3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統小類device_name_tag', + `device_amount` int(11) NOT NULL DEFAULT '0' COMMENT '設備總計', + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備類別 - UI 過濾用';"; await backendRepository.ExecuteSql(delete_group_sql); //更新整個device_group var insert_group_sql = @" - INSERT INTO device_group (device_disaster, device_building_guid, device_floor_guid, device_system_category_layer2, device_system_category_layer3, device_amount) + INSERT INTO device_group (device_disaster, device_building_tag, device_floor_guid, device_system_category_layer2, device_system_category_layer3, device_amount) SELECT dd.device_system_value AS device_disaster, - d.building_guid AS device_building_guid, + d.building_tag AS device_building_tag, d.floor_guid AS device_floor_guid, vv.device_system_category_layer2 AS device_system_category_layer2, d.device_system_category_layer3 AS device_system_category_layer3, @@ -1303,7 +1294,7 @@ namespace Backend.Controllers ) vv ON d.device_system_category_layer3 = vv.device_system_category_layer3 WHERE d.deleted = 0 GROUP BY dd.device_system_value, - d.building_guid, + d.building_tag, d.floor_guid, vv.device_system_category_layer2, d.device_system_category_layer3"; @@ -1321,8 +1312,8 @@ namespace Backend.Controllers { { "@id", deviceGroup.id}, { "@device_disaster", deviceGroup.device_disaster}, - { "@device_building_guid", deviceGroup.device_building_guid}, - { "@device_floor_guid", deviceGroup.device_floor_guid}, + { "@device_building_tag", deviceGroup.device_building_tag}, + { "@device_floor_guid", deviceGroup.device_floor_tag}, { "@device_system_category_layer2", deviceGroup.device_system_category_layer2}, { "@device_system_category_layer3", deviceGroup.device_system_category_layer3}, { "@device_amount", deviceGroup.device_amount}, @@ -1346,30 +1337,28 @@ namespace Backend.Controllers try { var sql = $@"SELECT - dm.device_master_guid, - dd.device_building_tag, - dd.device_name_tag, - dm.device_master_number, - dm.device_master_full_name, - dm.device_master_icon - FROM ( SELECT - d.device_building_tag, - d.device_name_tag - FROM ( - SELECT * - FROM device d - WHERE - d.building_guid = @Building_guid - AND d.main_system_guid = @Main_system_guid - AND d.sub_system_guid = @Sub_system_guid - AND d.floor_guid = @Floor_guid - AND d.deleted = 0 - ) d - GROUP BY d.device_building_tag, - d.device_name_tag) dd - LEFT JOIN device_master dm ON dd.device_building_tag = dm.device_building_tag - AND dd.device_name_tag = dm.device_name_tag - "; + dm.device_master_guid, + dd.device_building_tag, + dd.device_name_tag, + dm.device_master_number, + dm.device_master_full_name, + dm.device_master_icon + FROM ( SELECT + d.device_building_tag, + d.device_name_tag + FROM ( + SELECT * + FROM device d + WHERE + d.device_building_tag = @building_tag + AND d.device_system_tag = @main_system_tag + AND d.device_name_tag = @sub_system_tag + AND d.device_floor_tag = @floor_tag + AND d.deleted = 0 + ) d + GROUP BY d.device_building_tag, d.device_name_tag) dd + LEFT JOIN device_master dm ON dd.device_building_tag = dm.device_building_tag + AND dd.device_name_tag = dm.device_name_tag"; var deviceMasters = await backendRepository.GetAllAsync(sql, post); @@ -1590,15 +1579,15 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task>> GetDeviceItem(string sub_system_guid) + public async Task>> GetDeviceItem(string sub_system_tag) { ApiResult> apiResult = new ApiResult>(); try { - string sWhere = "deleted = 0 AND sub_system_guid = @Sub_system_guid"; + string sWhere = "deleted = 0 AND sub_system_tag = @Sub_system_tag"; - object param = new { Sub_system_guid = sub_system_guid }; + object param = new { Sub_system_tag = sub_system_tag }; var deviceItems = await backendRepository.GetAllAsync("device_item", sWhere, param); diff --git a/Backend/Controllers/MybaseController.cs b/Backend/Controllers/MybaseController.cs index 700dbbb..13ea16b 100644 --- a/Backend/Controllers/MybaseController.cs +++ b/Backend/Controllers/MybaseController.cs @@ -31,6 +31,9 @@ namespace Backend.Controllers protected MyUserInfo myUserInfo = null; public string controllerName; public string actionName; + public string main_system_type = "device_system_category_layer2"; + public string sub_system_type = "device_system_category_layer3"; + public MybaseController() { } public override void OnActionExecuting(ActionExecutingContext filterContext) { diff --git a/Backend/Controllers/SystemCategoryController.cs b/Backend/Controllers/SystemCategoryController.cs index 0daf22d..1cdcb5a 100644 --- a/Backend/Controllers/SystemCategoryController.cs +++ b/Backend/Controllers/SystemCategoryController.cs @@ -29,15 +29,17 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task>> SystemMainList() + public async Task>> SystemMainList() { - ApiResult> apiResult = new ApiResult>(); + ApiResult> apiResult = new ApiResult>(); try { - var sWhere = "deleted = 0"; + var sWhere = "deleted = 0 AND system_type = @System_type"; - var systemMainList = await backendRepository.GetAllAsync("main_system", sWhere, null, "priority ASC, created_at DESC"); + var param = new { System_type = main_system_type }; + + var systemMainList = await backendRepository.GetAllAsync("variable", sWhere, param, "system_priority ASC, created_at DESC"); apiResult.Code = "0000"; apiResult.Data = systemMainList; @@ -57,17 +59,17 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task> GetOneSystemMain(string guid) + public async Task> GetOneSystemMain(int id) { - ApiResult apiResult = new ApiResult(); + ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND main_system_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = guid }; + object param = new { Deleted = 0, id = id}; - var systemMain = await backendRepository.GetOneAsync("main_system", sWhere, param); + var systemMain = await backendRepository.GetOneAsync("variable", sWhere, param); apiResult.Code = "0000"; apiResult.Data = systemMain; @@ -87,81 +89,66 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task> SaveSystemMain(SystemMain post) + public async Task> SaveSystemMain(VariableInfo post) { ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND main_system_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = post.Main_system_guid }; + object param = new { Deleted = 0, id = post.id }; - var systemMain = await backendRepository.GetOneAsync("main_system", sWhere, param); + var systemMain = await backendRepository.GetOneAsync("variable", sWhere, param); if (systemMain == null) { //新增 - //產生一組GUID - var guid = Guid.NewGuid(); //系統大類GUID + //獲取最新的大類 + sWhere = @$"deleted = @Deleted AND system_type = @System_type"; + param = new { Deleted = 0, System_type = main_system_type }; + var sOrder = @"id DESC LIMIT 1"; + var latestVariable = await backendRepository.GetOneAsync("variable", sWhere, param, sOrder); - Dictionary systemMainDic = new Dictionary() + Dictionary variableMainDic = new Dictionary() { - { "@main_system_guid", guid}, - { "@full_name", post.Full_name}, - { "@code", post.Code}, - { "@created_by", myUserInfo.Userinfo_guid} + { "@system_type", main_system_type}, + { "@system_key", post.System_key}, + { "@system_value", post.system_value}, + { "@system_remark", "系統類別(第2層)"}, + { "@system_priority", latestVariable.system_priority + 1}, + { "@created_by", myUserInfo.Userinfo_guid}, + { "@created_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} }; - await backendRepository.AddOneByCustomTable(systemMainDic, "main_system"); + await backendRepository.AddOneByCustomTable(variableMainDic, "variable"); apiResult.Code = "0000"; apiResult.Msg = "新增成功"; } else { - Dictionary systemMainDic = new Dictionary() + Dictionary variableMainDic = new Dictionary() { - { "@full_name", post.Full_name}, - { "@code", post.Code}, + { "@system_key", post.System_key}, + { "@system_value", post.system_value}, { "@updated_by", myUserInfo.Userinfo_guid}, { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}, }; - await backendRepository.UpdateOneByCustomTable(systemMainDic, "main_system", "main_system_guid='" + systemMain.Main_system_guid + "'"); + await backendRepository.UpdateOneByCustomTable(variableMainDic, "variable", "id='" + systemMain.id + "' AND deleted = 0"); var AuthCodes = await backendRepository.GetAllAsync( - @$"select AuthCode from auth_page ap - join sub_system ss on ss.sub_system_guid = ap.ShowView - join main_system ms on ms.main_system_guid = ss.main_system_guid - where ms.main_system_guid = '{systemMain.Main_system_guid}'"); + @$"select AuthCode + from auth_page ap + join variable sv on ap.ShowView = sv.id and sv.system_type = 'device_system_category_layer1' + where sv.system_parent_id = '{systemMain.id}'"); if(AuthCodes.Count > 0) { await backendRepository.ExecuteSql($@"UPDATE auth_page - SET MainName = '{post.Full_name}' + SET MainName = '{post.System_key}' WHERE AuthCode IN @authCode;",new { authCode = AuthCodes }); - } - - #region 新增至派送資料表 - var auth_Pages = await backendRepository.GetAllAsync("auth_page", ""); - List> authPagesDics = new List>(); - foreach (var auth_page in auth_Pages) - { - Dictionary authPagesDic = new Dictionary() - { - { "@AuthCode", auth_page.AuthCode}, - { "@AuthType", auth_page.AuthType}, - { "@MainName", auth_page.MainName}, - { "@SubName", auth_page.SubName}, - { "@building_guid", auth_page.building_guid}, - { "@ShowView", auth_page.ShowView}, - { "@created_at", auth_page.created_at}, - }; - - authPagesDics.Add(authPagesDic); - } - await backendRepository.ManualInsertBackgroundServiceTask("", "", "auth_page", "purge_all_insert", authPagesDics); - #endregion + } apiResult.Code = "0000"; apiResult.Msg = "修改成功"; @@ -185,17 +172,17 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task> DeleteOneSystemMain(string guid) + public async Task> DeleteOneSystemMain(int id) { ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND main_system_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = guid }; + object param = new { Deleted = 0, id = id }; - var systemMain = await backendRepository.GetOneAsync("main_system", sWhere, param); + var systemMain = await backendRepository.GetOneAsync("variable", sWhere, param); if (systemMain == null) { @@ -208,11 +195,11 @@ namespace Backend.Controllers var sbuildMenu = $@"SELECT b.full_name FROM building_menu bm - LEFT JOIN building b ON bm.building_guid = b.building_guid AND b.deleted = 0 - WHERE bm.main_system_guid = @Guid + LEFT JOIN building b ON bm.building_tag = b.building_tag AND b.deleted = 0 + WHERE bm.main_system_tag = @System_Value GROUP BY b.full_name"; - var buildMenus = await backendRepository.GetAllAsync(sbuildMenu, new { Guid = guid }); + var buildMenus = await backendRepository.GetAllAsync(sbuildMenu, new { System_Value = systemMain.system_value }); if (buildMenus.Count > 0) { apiResult.Code = "9997"; @@ -222,19 +209,20 @@ namespace Backend.Controllers } //檢查底下是否有未刪除的系統小類 - string sSubWhere = @$"deleted = @Deleted AND main_system_guid = @Guid"; - object sub_param = new { Deleted = 0, Guid = systemMain.Main_system_guid }; - var systemSubs = await backendRepository.GetAllAsync("sub_system", sWhere, param); + string sqlSub = @$"SELECT id FROM variable + WHERE deleted = @Deleted AND system_parent_id = @id"; + object sub_param = new { Deleted = 0, id = id }; + var v = await backendRepository.GetAllAsync(sqlSub, sub_param); - if (systemSubs.Count > 0) + if (v.Count > 0) { apiResult.Code = "9997"; apiResult.Msg = "系統小類中尚有小類正在使用系統大類,故無法刪除"; - apiResult.Data = string.Join("
", systemSubs.Select(x => x.Full_name).ToList()); + apiResult.Data = string.Join("
", v.Where(x => x.id == id).Select(x => x.System_key).ToList()); return apiResult; } - await backendRepository.DeleteOne(guid, "main_system", "main_system_guid"); + await backendRepository.DeleteOne(id.ToString(), "variable", "id"); apiResult.Code = "0000"; apiResult.Msg = "刪除成功"; @@ -243,7 +231,7 @@ namespace Backend.Controllers { apiResult.Code = "9999"; apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; - Logger.LogError("【" + controllerName + "/" + actionName + "】" + "main_system_guid=" + guid); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + "id=" + id); Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -256,18 +244,17 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task>> SystemSubList(string main_system_guid) + public async Task>> SystemSubList(int id) { - ApiResult> apiResult = new ApiResult>(); + ApiResult> apiResult = new ApiResult>(); try { + var sWhere = @"deleted = @Deleted AND system_parent_id = @id"; - var sWhere = @"deleted = @Deleted AND main_system_guid = @Main_system_guid"; + object param = new { Deleted = 0, id = id}; - object param = new { Deleted = 0, Main_system_guid = main_system_guid }; - - var systemSubs = await backendRepository.GetAllAsync("sub_system", sWhere, param, "priority ASC, created_at DESC"); + var systemSubs = await backendRepository.GetAllAsync("variable", sWhere, param, "system_priority ASC, created_at DESC"); apiResult.Code = "0000"; apiResult.Data = systemSubs; @@ -287,17 +274,17 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task> GetOneSystemSub(string guid) + public async Task> GetOneSystemSub(int id) { - ApiResult apiResult = new ApiResult(); + ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND sub_system_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = guid }; + object param = new { Deleted = 0, id = id }; - var systemSub = await backendRepository.GetOneAsync("sub_system", sWhere, param); + var systemSub = await backendRepository.GetOneAsync("variable", sWhere, param); apiResult.Code = "0000"; apiResult.Data = systemSub; @@ -317,79 +304,86 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task> SaveSystemSub(SystemSub post) + public async Task> SaveSystemSub(VariableInfo post) { ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND sub_system_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = post.Sub_system_guid }; + object param = new { Deleted = 0, id = post.id }; - var systemSub = await backendRepository.GetOneAsync("sub_system", sWhere, param); + var systemSub = await backendRepository.GetOneAsync("variable", sWhere, param); + sWhere = @$"deleted = 0 AND system_type = @sub_system_type AND system_value = @system_value"; + param = new { sub_system_type = sub_system_type, system_value = post.system_value }; + var subV = await backendRepository.GetOneAsync("variable", sWhere, param); + if (systemSub == null) { + if (subV != null) + { + apiResult.Code = "0001"; + apiResult.Msg = "不可新增相同的系統小類代號。"; + return apiResult; + } + //新增 //產生一組GUID - var guid = Guid.NewGuid(); //GUID + //獲取最新的大類 + sWhere = @$"deleted = @Deleted AND system_type = @System_type"; + param = new { Deleted = 0, System_type = sub_system_type }; + var sOrder = @"id DESC LIMIT 1"; + var latestVariable = await backendRepository.GetOneAsync("variable", sWhere, param, sOrder); Dictionary systemSubDic = new Dictionary() { - { "@sub_system_guid", guid}, - { "@main_system_guid", post.Main_system_guid}, - { "@full_name", post.Full_name}, - { "@created_by", myUserInfo.Userinfo_guid} + { "@system_type", sub_system_type}, + { "@system_key", post.System_key}, + { "@system_value", post.system_value}, + { "@system_parent_id", post.system_parent_id}, + { "@system_remark", "系統類別(第3層)"}, + { "@system_priority", latestVariable.system_priority + 1}, + { "@created_by", myUserInfo.Userinfo_guid}, + { "@created_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} }; - await backendRepository.AddOneByCustomTable(systemSubDic, "sub_system"); + await backendRepository.AddOneByCustomTable(systemSubDic, "variable"); apiResult.Code = "0000"; apiResult.Msg = "新增成功"; } else { + if (subV != null) + { + apiResult.Code = "0001"; + apiResult.Msg = "不可修改成相同的系統小類代號。"; + return apiResult; + } + Dictionary systemSubDic = new Dictionary() { - { "@full_name", post.Full_name}, + + { "@system_key", post.System_key}, + { "@system_value", post.system_value}, { "@updated_by", myUserInfo.Userinfo_guid}, { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}, }; - await backendRepository.UpdateOneByCustomTable(systemSubDic, "sub_system", "sub_system_guid='" + systemSub.Sub_system_guid + "'"); + await backendRepository.UpdateOneByCustomTable(systemSubDic, "variable", "id='" + systemSub.id + "'"); var AuthCodes = await backendRepository.GetAllAsync( @$"select AuthCode from auth_page ap - where ap.ShowView = '{systemSub.Sub_system_guid}'"); + where ap.ShowView = '{systemSub.id}'"); if (AuthCodes.Count > 0) { await backendRepository.ExecuteSql($@"UPDATE auth_page - SET SubName = '{post.Full_name}' + SET SubName = '{post.System_key}' WHERE AuthCode IN @authCode;", new { authCode = AuthCodes }); } - #region 新增至派送資料表 - var auth_Pages = await backendRepository.GetAllAsync("auth_page", ""); - List> authPagesDics = new List>(); - foreach (var auth_page in auth_Pages) - { - Dictionary authPagesDic = new Dictionary() - { - { "@AuthCode", auth_page.AuthCode}, - { "@AuthType", auth_page.AuthType}, - { "@MainName", auth_page.MainName}, - { "@SubName", auth_page.SubName}, - { "@building_guid", auth_page.building_guid}, - { "@ShowView", auth_page.ShowView}, - { "@created_at", auth_page.created_at}, - }; - - authPagesDics.Add(authPagesDic); - } - await backendRepository.ManualInsertBackgroundServiceTask("", "", "auth_page", "purge_all_insert", authPagesDics); - #endregion - apiResult.Code = "0000"; apiResult.Msg = "修改成功"; } @@ -412,17 +406,17 @@ namespace Backend.Controllers /// /// [HttpPost] - public async Task> DeleteOneSystemSub(string guid) + public async Task> DeleteOneSystemSub(string id) { ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND sub_system_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = guid }; + object param = new { Deleted = 0, id = id }; - var systemSub = await backendRepository.GetOneAsync("sub_system", sWhere, param); + var systemSub = await backendRepository.GetOneAsync("variable", sWhere, param); if (systemSub == null) { @@ -433,13 +427,14 @@ namespace Backend.Controllers //檢查是否有未刪除的區域選單 var sbuildMenu = $@"SELECT - CONCAT(b.full_name, ' - ', ms.full_name) + CONCAT(b.full_name, ' - ', sv.system_key) FROM building_menu bm - LEFT JOIN building b ON bm.building_guid = b.building_guid AND b.deleted = 0 - LEFT JOIN main_system ms ON bm.main_system_guid = ms.main_system_guid AND ms.deleted = 0 - WHERE bm.sub_system_guid = @Guid"; + LEFT JOIN building b ON bm.building_tag = b.building_tag AND b.deleted = 0 + LEFT JOIN variable sv ON bm.sub_system_tag = sv.system_value AND sv.deleted = 0 + LEFT JOIN variable mv ON sv.system_parent_id = mv.id AND mv.deleted = 0 + WHERE sv.id = @id"; - var buildMenus = await backendRepository.GetAllAsync(sbuildMenu, new { Guid = guid }); + var buildMenus = await backendRepository.GetAllAsync(sbuildMenu, new { id = id }); if (buildMenus.Count > 0) { apiResult.Code = "9997"; @@ -450,16 +445,15 @@ namespace Backend.Controllers //檢查是否有未刪除的系統小類樓層 var ssubSystemFloor = $@"SELECT - CONCAT(b.full_name, ' - ', ms.full_name, ' - ', ss.full_name, ' - ', f.full_name) + CONCAT(b.full_name, ' - ', mv.full_name, ' - ', sv.full_name, ' - ', f.full_name) FROM sub_system_floor ssf - LEFT JOIN building b ON ssf.building_guid = b.building_guid AND b.deleted = 0 - LEFT JOIN main_system ms ON ssf.main_system_guid = ms.main_system_guid AND ms.deleted = 0 - LEFT JOIN sub_system ss ON ssf.sub_system_guid = ss.sub_system_guid AND ss.deleted = 0 + LEFT JOIN building b ON ssf.building_tag = b.building_tag AND b.deleted = 0 + LEFT JOIN variable sv ON sv.system_value = ssf.sub_system_tag AND sv.deleted = 0 + LEFT JOIN variable mv ON sv.system_parent_id = mv.id AND mv.deleted = 0 LEFT JOIN floor f ON ssf.floor_guid = f.floor_guid AND f.deleted = 0 - WHERE ssf.sub_system_guid = @Guid - AND ssf.deleted = 0"; + WHERE sv.id = @id AND ssf.deleted = 0"; - var subSystemFloor = await backendRepository.GetAllAsync(sbuildMenu, new { Guid = guid }); + var subSystemFloor = await backendRepository.GetAllAsync(sbuildMenu, new { id = id }); if (subSystemFloor.Count > 0) { apiResult.Code = "9997"; @@ -470,12 +464,12 @@ namespace Backend.Controllers //檢查是否有未刪除的設備項目 var sdeviceItem = $@"SELECT - di.full_name + di.full_name FROM device_item di - WHERE di.deleted = 0 - AND di.sub_system_guid = @Guid"; + INNER JOIN variable sv on di.device_name_tag = sv.system_value + WHERE sv.deleted = 0 AND sv.id = @id AND di.deleted = 0"; - var deviceItems = await backendRepository.GetAllAsync(sdeviceItem, new { Guid = guid }); + var deviceItems = await backendRepository.GetAllAsync(sdeviceItem, new { id = id }); if (deviceItems.Count > 0) { apiResult.Code = "9997"; @@ -484,7 +478,7 @@ namespace Backend.Controllers return apiResult; } - await backendRepository.DeleteOne(guid, "sub_system", "sub_system_guid"); + await backendRepository.DeleteOne(id, "variable", "id"); apiResult.Code = "0000"; apiResult.Msg = "刪除成功"; @@ -493,7 +487,7 @@ namespace Backend.Controllers { apiResult.Code = "9999"; apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; - Logger.LogError("【" + controllerName + "/" + actionName + "】" + "sub_system_guid=" + guid); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + "id=" + id); Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -510,10 +504,10 @@ namespace Backend.Controllers //檢查是否有未刪除的區域選單 if(device_Item.is_show_riserDiagram == 1) { - var sql_show_riserDiagram = $@"SELECT * FROM device_item di - WHERE di.sub_system_guid = @SubSystemGuid AND di.deleted = 0 AND is_show_riserDiagram = 1"; + var sql_show_riserDiagram = $@"SELECT * FROM device_item di + WHERE di.id = @id AND di.deleted = 0 AND is_show_riserDiagram = 1"; - var is_show_riserDiagram = await backendRepository.GetAllAsync(sql_show_riserDiagram, new { SubSystemGuid = device_Item.sub_system_guid }); + var is_show_riserDiagram = await backendRepository.GetAllAsync(sql_show_riserDiagram, new { id = device_Item.id }); if (is_show_riserDiagram.Count() > 0) { @@ -523,16 +517,15 @@ namespace Backend.Controllers } } - if (device_Item.device_item_guid == null) + if (device_Item.id == 0) { + var main_tag = await backendRepository.GetOneAsync($@"SELECT system_value FROM variable WHERE id = @id", new { id = device_Item.device_system_tag }); + var sub_tag = await backendRepository.GetOneAsync($@"SELECT system_value FROM variable WHERE id = @id", new { id = device_Item.device_name_tag }); //新增 - //產生一組GUID - var guid = Guid.NewGuid(); //GUID - Dictionary Device_itemDic = new Dictionary() { - { "@device_item_guid", guid}, - { "@sub_system_guid", device_Item.sub_system_guid}, + { "@device_system_tag", main_tag}, + { "@device_name_tag", sub_tag}, { "@full_name", device_Item.full_name}, { "@points", device_Item.points}, { "@unit", device_Item.unit}, @@ -551,7 +544,6 @@ namespace Backend.Controllers { Dictionary Device_itemDic = new Dictionary() { - { "@sub_system_guid", device_Item.sub_system_guid}, { "@full_name", device_Item.full_name}, { "@points", device_Item.points}, { "@unit", device_Item.unit}, @@ -563,7 +555,7 @@ namespace Backend.Controllers { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}, }; - await backendRepository.UpdateOneByCustomTable(Device_itemDic, "device_item", "device_item_guid='" + device_Item.device_item_guid + "'"); + await backendRepository.UpdateOneByCustomTable(Device_itemDic, "device_item", "id='" + device_Item.id + "'"); apiResult.Code = "0000"; apiResult.Msg = "修改成功"; @@ -582,17 +574,21 @@ namespace Backend.Controllers } [HttpPost] - public async Task>> DeviceItemTable(string sub_system_guid) + public async Task>> DeviceItemTable(int id) { ApiResult> apiResult = new ApiResult>(); try { - var sWhere = @"deleted = @Deleted AND sub_system_guid = @Sub_system_guid"; + var sql = @"SELECT di.* + FROM device_item di + JOIN variable sv ON di.device_name_tag = sv.system_value + JOIN variable mv ON sv.system_parent_id = mv.id AND di.device_system_tag = mv.system_value + WHERE sv.id = @id AND di.deleted = @Deleted"; - object param = new { Deleted = 0, Sub_system_guid = sub_system_guid }; + object param = new { Deleted = 0, id = id }; - var systemSubs = await backendRepository.GetAllAsync("device_item", sWhere, param, "created_at DESC"); + var systemSubs = await backendRepository.GetAllAsync(sql, param); apiResult.Code = "0000"; apiResult.Data = systemSubs; @@ -607,15 +603,15 @@ namespace Backend.Controllers } [HttpPost] - public async Task> GetOneDeviceItem(string guid) + public async Task> GetOneDeviceItem(int id) { ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND device_item_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = guid }; + object param = new { Deleted = 0, id = id }; var Deviceitem = await backendRepository.GetOneAsync("device_item", sWhere, param); @@ -632,15 +628,15 @@ namespace Backend.Controllers } [HttpPost] - public async Task> DeleteOneSystemSubDeviceItem(string guid) + public async Task> DeleteOneSystemSubDeviceItem(int id) { ApiResult apiResult = new ApiResult(); try { - string sWhere = @$"deleted = @Deleted AND device_item_guid = @Guid"; + string sWhere = @$"deleted = @Deleted AND id = @id"; - object param = new { Deleted = 0, Guid = guid }; + object param = new { Deleted = 0, id = id}; var device_Item = await backendRepository.GetOneAsync("device_item", sWhere, param); @@ -651,7 +647,7 @@ namespace Backend.Controllers return apiResult; } - await backendRepository.DeleteOne(guid, "device_item", "device_item_guid"); + await backendRepository.DeleteOne(id.ToString(), "device_item", "id"); apiResult.Code = "0000"; apiResult.Msg = "刪除成功"; @@ -660,7 +656,7 @@ namespace Backend.Controllers { apiResult.Code = "9999"; apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; - Logger.LogError("【" + controllerName + "/" + actionName + "】" + "device_item_guid=" + guid); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + "id=" + id); Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -672,7 +668,13 @@ namespace Backend.Controllers ApiResult apiResult = new ApiResult(); try { - var point = await backendRepository.GetOneAsync("device_item", $" sub_system_guid = '{post.sub_system_guid}' and points = '{post.points}' and device_item_guid != '{post.device_item_guid}' and deleted = 0"); + var sql = $@"SELECT * + FROM device_item di + INNER JOIN variable v ON di.device_name_tag = v.system_value + WHERE v.id = @SubId AND di.id != @Id AND points = @Points"; + + var param = new { SubId = post.subId, Points = post.points, id = post.id }; + var point = await backendRepository.GetOneAsync(sql, param); if (point != null) { apiResult.Data = true; @@ -700,9 +702,9 @@ namespace Backend.Controllers try { var tags = await backendRepository.GetAllAsync( - @$"select * from (select dk.device_building_tag ,dk.device_name_tag,dk.device_system_tag from device_kind dk where dk.device_normal_point_guid = '{post.guid}') dkn - union(select dk.device_building_tag, dk.device_name_tag, dk.device_system_tag from device_kind dk where dk.device_close_point_guid = '{post.guid}') - union(select dk.device_building_tag, dk.device_name_tag, dk.device_system_tag from device_kind dk where dk.device_error_point_guid = '{post.guid}')"); + @$"select * from (select dk.device_building_tag ,dk.device_name_tag,dk.device_system_tag from device_kind dk where dk.device_normal_point_id = @id) dkn + union(select dk.device_building_tag, dk.device_name_tag, dk.device_system_tag from device_kind dk where dk.device_close_point_id = @id) + union(select dk.device_building_tag, dk.device_name_tag, dk.device_system_tag from device_kind dk where dk.device_error_point_id = @id)", new { id = post.guid}); if (tags.Count == 0) { @@ -722,20 +724,24 @@ namespace Backend.Controllers }; var unionsql = ""; var last = tags.Last(); + var sub_system = await backendRepository.GetOneAsync($@"SELECT * FROM variable WHERE id = @id", new { id = post.subguid }); foreach (var tag in tags) { - unionsql += $@"select d.building_guid,d.main_system_guid,d.sub_system_guid,d.device_name_tag from device d where d.sub_system_guid = '{post.subguid}' and d.device_building_tag = '{tag.device_building_tag}' and d.device_system_tag = '{tag.device_system_tag}' and d.device_name_tag = '{tag.device_name_tag}' group by d.building_guid,d.main_system_guid,d.sub_system_guid,d.device_name_tag"; + unionsql += $@"select d.building_tag,d.device_system_tag,d.device_name_tag,d.device_last_name from device d where d.device_name_tag = '{sub_system.system_value}' + and d.device_building_tag = '{tag.device_building_tag}' and d.device_system_tag = '{tag.device_system_tag}' and d.device_name_tag = '{tag.device_name_tag}' group by d.building_guid,d.main_system_guid,d.sub_system_guid,d.device_name_tag"; if (!last.Equals(tag)) { unionsql += " union "; } } - var sql = @$"select ms.full_name msname,b.full_name bname,s.full_name subname,de.device_name_tag from + var sql = @$"select mv.system_key msname, b.full_name bname, sv.system_key subname,de.device_last_name as device_name_tag from ({unionsql}) de - left join main_system ms on ms.main_system_guid = de.main_system_guid - left join building b on b.building_guid = de.building_guid - left join sub_system s on s.sub_system_guid = de.sub_system_guid"; - var names = await backendRepository.GetAllAsync(sql); + left join variable mv on mv.system_value = de.device_system_tag and mv.system_type = @main_system_type + left join building b on b.building_tag = de.building_tag + left join variable sv on sv.system_value = de.device_name_tag and sv.system_type = @sub_system_type"; + + var param = new { main_system_type = main_system_type, sub_system_type = sub_system_type}; + var names = await backendRepository.GetAllAsync(sql, param); var count = 0; foreach (var name in names) { diff --git a/Backend/Models/BuildMenu.cs b/Backend/Models/BuildMenu.cs index f677e56..ed61c61 100644 --- a/Backend/Models/BuildMenu.cs +++ b/Backend/Models/BuildMenu.cs @@ -7,18 +7,27 @@ namespace Backend.Models { public class BuildMenu : Actor { - public string building_guid { get; set; } - public string main_system_guid { get; set; } - public string sub_system_guid { get; set; } - public byte drawing { get; set; } - public byte icon_click { get; set; } - public string icon_click_url { get; set; } - public int icon_click_url_width { get; set; } - public int icon_click_url_height { get; set; } - public string system_url { get; set; } - public string riser_diagram_url { get; set; } - public byte planimetric_click { get; set; } - public string planimetric_floor_guid { get; set; } + public string building_tag { get; set; } + public string main_system_tag { get; set; } + public string sub_system_tag { get; set; } + public byte left_drawing { get; set; } + public byte left_icon_click { get; set; } + public string left_icon_click_url { get; set; } + public int left_icon_click_url_width { get; set; } + public int left_icon_click_url_height { get; set; } + public string left_system_url { get; set; } + public string left_riser_diagram_url { get; set; } + public byte left_planimetric_click { get; set; } + public string left_planimetric_floor_guid { get; set; } + public byte right_drawing { get; set; } + public byte right_icon_click { get; set; } + public string right_icon_click_url { get; set; } + public int right_icon_click_url_width { get; set; } + public int right_icon_click_url_height { get; set; } + public string right_system_url { get; set; } + public string right_riser_diagram_url { get; set; } + public byte right_planimetric_click { get; set; } + public string right_planimetric_floor_guid { get; set; } } public class BuildMenuAddSub: BuildMenu { @@ -26,26 +35,29 @@ namespace Backend.Models } public class SubListIn { - public string main { get; set; } - public string build { get; set; } + public string main_system_tag { get; set; } + public string building_tag { get; set; } } public class BuildMenuTablePost { - public string build { get; set; } + public string building_tag { get; set; } public List MainList { get; set; } } public class BuildMenuTable: BuildMenu { public string main_system_guid_name { get; set; } public string sub_system_guid_name { get; set; } - public string drawing_name { get; set; } - public string icon_click_name { get; set; } - public string planimetric_click_name { get; set; } + public string left_drawing_name { get; set; } + public string right_drawing_name { get; set; } + public string left_icon_click_name { get; set; } + public string left_planimetric_click_name { get; set; } + public string right_icon_click_name { get; set; } + public string right_planimetric_click_name { get; set; } public string floor_guid_name { get; set; } } public class MenuIn : SubListIn { - public string sub { get; set; } + public string sub_system_tag { get; set; } } public class BuildMenuFloor : Actor { @@ -60,6 +72,7 @@ namespace Backend.Models public class BuildMenuFloorTable : BuildMenuFloor { + public string sub_system_floor_id { get; set; } public string main_system_guid_name { get; set; } public string sub_system_guid_name { get; set; } public string floor_guid_name { get; set; } diff --git a/Backend/Models/BuildModel.cs b/Backend/Models/BuildModel.cs index 9c0358d..ab59ef2 100644 --- a/Backend/Models/BuildModel.cs +++ b/Backend/Models/BuildModel.cs @@ -9,6 +9,7 @@ namespace Backend.Models public class BuildInfo : Actor { public int Priority { get; set; } + public string building_tag { get; set; } public string Building_guid { get; set; } //區域GUID public string Full_name { get; set; } //區域名稱 public string Ip_address { get; set; } //監控主機 IP @@ -22,6 +23,7 @@ namespace Backend.Models { public string Floor_guid { get; set; } //樓層GUID public string Building_guid { get; set; } //區域GUID + public string Building_tag { get; set; } //區域GUID public string Full_name { get; set; } //建築名稱 public string InitMapName { get; set; } //使用者命名平面圖檔檔名 public string MapUrl { get; set; } //使用者命名平面圖檔檔名 @@ -42,6 +44,7 @@ namespace Backend.Models public class BuildInfoPriority { public string Building_guid { get; set; } //區域GUID + public string Building_tag { get; set; } //區域TAG public int Priority { get; set; } } diff --git a/Backend/Models/BuildingCollapse.cs b/Backend/Models/BuildingCollapse.cs index e559632..5627fa5 100644 --- a/Backend/Models/BuildingCollapse.cs +++ b/Backend/Models/BuildingCollapse.cs @@ -7,20 +7,20 @@ namespace Backend.Models { public class BuildingMenuRawData { - public string Building_guid { get; set; } + public string building_tag { get; set; } public string bFull_name { get; set; } public int bPriority { get; set; } - public string Main_system_guid { get; set; } + public string main_system_tag { get; set; } public string mFull_name { get; set; } public int mPriority { get; set; } - public string Sub_system_guid { get; set; } + public string sub_system_tag { get; set; } public string sFull_name { get; set; } public int sPriority { get; set; } } public class BuildingCollapse : Actor { - public string Building_guid { get; set; } + public string Building_tag { get; set; } public string Full_name { get; set; } public string Ip_address { get; set; } public int Priority { get; set; } @@ -28,7 +28,7 @@ namespace Backend.Models } public class Main_system { - public string Main_system_guid { get; set; } + public string Main_system_tag { get; set; } public string Full_name { get; set; } public int Priority { get; set; } public string Code { get; set; } @@ -36,7 +36,7 @@ namespace Backend.Models } public class Sub_system { - public string Sub_system_guid { get; set; } + public string Sub_system_tag { get; set; } public string Full_name { get; set; } public int Priority { get; set; } public byte Drawing { get; set; } @@ -47,7 +47,7 @@ namespace Backend.Models } public class Floor { - public string Floor_guid { get; set; } + public string Floor_tag { get; set; } public string Full_name { get; set; } public string InitMapName { get; set; } public string Floor_map_name { get; set; } //平面圖檔名 @@ -56,11 +56,11 @@ namespace Backend.Models public class SubSystemFloorRawData { - public string Sub_system_floor_guid { get; set; } - public string Building_guid { get; set; } - public string Main_system_guid { get; set; } - public string Sub_system_guid { get; set; } - public string Floor_guid { get; set; } + public string id { get; set; } + public string building_tag { get; set; } + public string main_system_tag { get; set; } + public string sub_system_tag { get; set; } + public string Floor_tag { get; set; } public string fFull_name { get; set; } public string InitMapName { get; set; } public string Floor_map_name { get; set; } diff --git a/Backend/Models/Device.cs b/Backend/Models/Device.cs index f41df96..15c17f4 100644 --- a/Backend/Models/Device.cs +++ b/Backend/Models/Device.cs @@ -8,18 +8,18 @@ namespace Backend.Models { public class PostDeviceFilter { - public string Building_guid { get; set; } - public string Main_system_guid { get; set; } - public string Sub_system_guid { get; set; } - public string Floor_guid { get; set; } + public string building_tag { get; set; } + public string device_system_tag { get; set; } + public string device_name_tag { get; set; } + public string device_floor_tag { get; set; } } public class PostDeviceInfoAdd { - public string Building_guid { get; set; } - public string Main_system_guid { get; set; } - public string Sub_system_guid { get; set; } - public string Floor_guid { get; set; } + public string Building_tag { get; set; } + public string Main_system_tag { get; set; } + public string Sub_system_tag { get; set; } + public string Floor_tag { get; set; } public List SelectedDevices { get; set; } public IFormFile SelectedDevicesFile { get; set; } } @@ -239,8 +239,8 @@ namespace Backend.Models { public int id { get; set; } public string device_disaster { get; set; } - public string device_building_guid { get; set; } - public string device_floor_guid { get; set; } + public string device_building_tag { get; set; } + public string device_floor_tag { get; set; } public string device_system_category_layer2 { get; set; } public string device_system_category_layer3 { get; set; } public int device_amount { get; set; } diff --git a/Backend/Models/Mybase.cs b/Backend/Models/Mybase.cs index 74fe5db..bdc8b69 100644 --- a/Backend/Models/Mybase.cs +++ b/Backend/Models/Mybase.cs @@ -53,11 +53,12 @@ namespace Backend.Models public string Logo { get; set; } } - public class Variable + public class Variable : Actor { public string System_type { get; set; } public string System_key { get; set; } public string system_value { get; set; } + } public class VariableInfo : Variable diff --git a/Backend/Models/SystemCategory.cs b/Backend/Models/SystemCategory.cs index c51c19e..c6b9151 100644 --- a/Backend/Models/SystemCategory.cs +++ b/Backend/Models/SystemCategory.cs @@ -30,8 +30,12 @@ namespace Backend.Models public class Device_item : Actor { + public int id { get; set; } public string device_item_guid { get; set; } - public string sub_system_guid { get; set; } + public string device_area_tag { get; set; } + public string device_building_tag { get; set; } + public string device_system_tag { get; set; } + public string device_name_tag { get; set; } public string full_name { get; set; } public string points { get; set; } public string unit { get; set; } @@ -39,13 +43,14 @@ namespace Backend.Models public byte is_show_riserDiagram { get; set; } public byte is_controll { get; set; } public byte is_bool { get; set; } + public byte is_link { get; set; } } public class Checksame { - public string sub_system_guid { get; set; } + public int id { get; set; } + public string subId { get; set; } public string points { get; set; } - public string device_item_guid { get; set; } } public class Tags diff --git a/Backend/Views/BuildInfo/Index.cshtml b/Backend/Views/BuildInfo/Index.cshtml index 238ca27..9e49dfb 100644 --- a/Backend/Views/BuildInfo/Index.cshtml +++ b/Backend/Views/BuildInfo/Index.cshtml @@ -55,7 +55,7 @@ }, "columns": [ { - "data": "building_guid", + "data": "building_tag", "render": function (data, type, row, meta) { return meta.row + 1; } @@ -87,7 +87,7 @@ ], //"order": [[2, "desc"]], 'createdRow': function (row, data, dataIndex) { - $(row).attr('data-guid', data.building_guid); + $(row).attr('data-guid', data.building_tag); }, "ajax": { "url": "/BuildInfo/BuildInfoList", @@ -107,13 +107,13 @@ //樓層設定上方選單 $("#BuildList").empty(); $.each(data, function (key, value) { - $("#BuildList").append(``); + $("#BuildList").append(``); @*if (key == 0) { selected_build_guid_top_name = value.full_name; - $("#BuildList").append(``); + $("#BuildList").append(``); } else { - $("#BuildList").append(``); + $("#BuildList").append(``); }*@ }); @@ -129,7 +129,7 @@ var rowData = buildInfoTable.row(diff[i].node).data(); var obj = { - building_guid: rowData.building_guid, + building_tag: rowData.building_tag, priority: diff[i].newData } @@ -163,6 +163,9 @@ selected_build_guid = $(this).parents('tr').attr('data-guid'); $('#build-modal .modal-title').html("區域基本資料 - 修改"); + $('#build_name_tag').val(selected_build_guid); + $('#build_name_tag').prop('disabled', true); + $("#save-building-btn").attr("onClick", "EditBuild()"); $('#build_name_modal').val($(this).parents('tr')[0].children[1].innerText); $('#ip_address_modal').val($(this).parents('tr')[0].children[2].innerText); $('#ip_port_modal').val($(this).parents('tr')[0].children[3].innerText); @@ -187,7 +190,7 @@ if (result.value) { var url = "/BuildInfo/DeleteOneBuild/"; var send_data = { - guid: selected_build_guid + tag: selected_build_guid } $.post(url, send_data, function (rel) { if (rel.code == "9999") { @@ -218,7 +221,9 @@ function AddBuild() { selected_build_guid = "0"; BuildInfoValidate.resetForm(); + $("#save-building-btn").attr("onClick", "SaveBuild()"); $("#build-modal .modal-title").html("區域基本資料 - 新增"); + $('#build_name_tag').prop('disabled', false); $("#build-form").trigger("reset"); $("#build-modal").modal(); @@ -253,7 +258,42 @@ $("#save-building-btn").html('').attr("disabled", true); var url = "/BuildInfo/SaveBuildInfo"; var send_data = { - Building_guid: selected_build_guid, + building_tag: $('#build_name_tag').val(), + Full_name: $('#build_name_modal').val(), + Ip_address: $('#ip_address_modal').val(), + Ip_port: $('#ip_port_modal').val() + } + + $.post(url, send_data, function (rel) { + $("#save-building-btn").html('確定').attr("disabled", false); + if (rel.code != "0000") { + if (rel.code == "9999") { + toast_error(rel.msg); + } + else { + toast_warning(rel.msg); + } + return; + } + else { + toast_ok(rel.msg); + buildInfoTable.ajax.reload(null, false); + $('#build-modal').modal('hide'); + return; + } + }, 'json') + .fail(function (xhr, status, error) { + $("#save-building-btn").html('確定').attr("disabled", false); + }); + } + } + + function EditBuild() { + if ($("#build-form").valid()) { + $("#save-building-btn").html('').attr("disabled", true); + var url = "/BuildInfo/EditBuildInfo"; + var send_data = { + building_tag: selected_build_guid, Full_name: $('#build_name_modal').val(), Ip_address: $('#ip_address_modal').val(), Ip_port: $('#ip_port_modal').val() @@ -342,7 +382,7 @@ "url": "/BuildInfo/BuildFloorList", "type": "POST", "data": function (d) { - d.BuildGuid = selected_build_guid_top; + d.build_tag = selected_build_guid_top; }, "dataSrc": function (rel) { if (rel.code == "9999") { @@ -557,7 +597,7 @@ maps = $('#map_file_modal')[0].files formData.append("Floor_guid", selected_floor_guid); - formData.append("Building_guid", selected_build_guid_top); + formData.append("building_tag", selected_build_guid_top); formData.append("Full_name", $('#floor_name_modal').val()); if (maps.length > 0) { diff --git a/Backend/Views/BuildInfo/_BuildInfo.cshtml b/Backend/Views/BuildInfo/_BuildInfo.cshtml index c0d2dc3..fe932af 100644 --- a/Backend/Views/BuildInfo/_BuildInfo.cshtml +++ b/Backend/Views/BuildInfo/_BuildInfo.cshtml @@ -40,6 +40,10 @@