commit 34395a4fff7f0b8c1692f4971201ae55abc914ae Author: lzq <2495532633@qq.com> Date: Tue Dec 2 09:04:37 2025 +0800 1 diff --git a/z-doc/pdma/njzscloud-dispose.pdma b/z-doc/pdma/njzscloud-dispose.pdma new file mode 100644 index 0000000..a9a2527 --- /dev/null +++ b/z-doc/pdma/njzscloud-dispose.pdma @@ -0,0 +1,14521 @@ +{ + "id": "E268FF1C-0171-4BED-94BF-973DD8D729BB", + "profile": { + "version": "0.0.2", + "global": { + "dbDialects": [ + { + "defKey": "MySQL", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "mysql-connector-j-8.3.0.jar", + "jdbcReferDriver": "com.mysql.cj.jdbc.Driver", + "jdbcReferUrl": "jdbc:mysql://[ip]:[port]/[dbname]?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC", + "tableCreate": "DROP TABLE IF EXISTS {{=it.defKey}};\r\nCREATE TABLE {{=it.defKey}}\r\n(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{=field.dbDataType}}{{?field.dataLen>0}}{{='('}}{{=field.dataLen}}{{?field.numScale>0}}{{=','}}{{=field.numScale}}{{?}}{{=')'}}{{?}} {{= field.defaultValue ? 'DEFAULT' + ' ' + field.defaultValue : '' }} {{= field.notNull ? 'NOT NULL' : 'NULL' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} COMMENT '{{=field.intro.length > 0? field.defName + ';' + field.intro : field.defName}}'{{= index < it.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}{{~}}\r\n{{? pkList.length >0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i 0}}\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}`{{= field.defKey }}`{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\n{{?}}\n{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}ALTER TABLE {{= tableKey }} COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= schemaName }}{{=it.defKey}} RENAME TO {{= schemaName }}{{=defKey}};{{?}}\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, dbDataType, primaryKey } = field;\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON')) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return ` DEFAULT \"${defaultValue}\"`;\r\n } else {\r\n return ` DEFAULT ${defaultValue}`;\r\n }\r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{= tableKey }} ADD COLUMN `{{=field.defKey}}` {{=computeDatatype(field)}} {{= field.notNull ? 'NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT ' : '' }}{{= computeDefaultValue(field)}} {{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\r\n{{~}}\r\n", + "columnUpdate": "{{ \r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, primaryKey } = field;\r\n const dbDataType = field.dbDataType ? field.dbDataType : '';\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON')) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return `DEFAULT \"${defaultValue}\"`;\r\n } else {\r\n return `DEFAULT ${defaultValue}`;\r\n }\r\n };\r\n const computeDatatype = (field) => {\r\n const { dataLen, numScale, defaultValue } = field;\r\n const dbDataType = field.dbDataType ? field.dbDataType : '';\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{ \r\n let nextPrimaryKey = field.baseUpdate.next.primaryKey;\r\n let prePrimaryKey = field.baseUpdate.pre.primaryKey;\r\n let preDefKey = field.baseUpdate.pre.defKey;\r\n let updateKeys = field.baseUpdate.updateKeys.split(',');\r\n}}\r\n{{? updateKeys.includes('primaryKey') && updateKeys.includes('defaultValue')}}\r\nALTER TABLE {{= tableKey }} ALTER COLUMN `{{=field.defKey}}` SET DEFAULT {{=field.defaultValue}};\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey' || item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'intro' || item === 'defName' || item === 'notNull' || item === 'autoIncrement') }}\r\nALTER TABLE {{= tableKey }} {{? updateKeys.includes('defKey')}}CHANGE `{{=preDefKey}}` `{{=field.defKey}}` {{??}} MODIFY COLUMN `{{=field.defKey}}` {{?}} {{=computeDatatype(field)}} {{= field.notNull ? 'NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT ' : '' }} {{= computeDefaultValue(field)}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\r\n{{?}}\r\n{{~}}\r\n", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}} {{?}}INDEX `{{=row.defKey}}` ON {{= tableKey }} (\r\n {{~row.fields:field:idx}}\r\n `{{=field.fieldDefKey}}` {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n){{? row.defName || row.intro }}COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}'{{?}};\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n let updateKeys = row.baseUpdate.updateKeys.split(',');\n let preDefKey = row.baseUpdate.pre.defKey;\n}}\nALTER TABLE {{= tableKey }}\nDROP INDEX {{? updateKeys.includes('defKey')}}`{{=preDefKey}}` {{??}} `{{=row.defKey}}`{{?}}, \nADD {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX `{{=row.defKey}}`(\n {{~row.fields:field:idx}}\n `{{=field.fieldDefKey}}` {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n){{? row.defName || row.intro }}COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}'{{?}};\n{{~}}", + "indexDelete": "{{\r\n let indexesUpdate = it.indexesUpdate; \r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~indexesUpdate:index:i}}\r\nALTER TABLE {{= tableKey }} DROP INDEX {{=index.defKey}};\r\n{{~}}", + "metaTableQuery": "SELECT\r\n null AS id,\r\n table_name AS def_key,\r\n table_comment AS def_name,\r\n table_schema AS schema_name\r\nFROM\r\n information_schema.tables\r\nWHERE table_type = 'BASE TABLE'\r\n and table_schema in (:schemaName)", + "metaColumnQuery": "SELECT\n table_schema as schema_name,\n table_name AS tbl_def_key,\n ordinal_position as order_value,\n column_name AS def_key,\n column_comment AS def_name,\n '' AS intro,\n data_type AS db_data_type,\n IF(data_type = column_type or data_type = 'decimal', IF(data_type = 'decimal', CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(COLUMN_TYPE, '(', -1), ',', 1) AS UNSIGNED), NULL),character_maximum_length) AS data_len,\n IF(data_type = column_type or data_type = 'decimal', IF(data_type = 'decimal', CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(COLUMN_TYPE, ',', -1), ')', 1) AS UNSIGNED), NULL), numeric_scale ) AS num_scale,\n IF(column_key = 'PRI', 1, 0 ) AS primary_key,\n IF(is_nullable = 'YES', 0, 1 ) AS not_null,\n IF(extra = 'AUTO_INCREMENT', 1, 0 ) AS auto_increment,\n column_default AS default_value\nFROM\n information_schema.COLUMNS\nWHERE\n table_schema in (:schemaName)\n and CONCAT(table_schema, '.', table_name) in (:sysTableNames)\nORDER BY\n table_schema ASC,\n table_name ASC,\n ordinal_position ASC", + "metaIndexQuery": "SELECT INDEX_SCHEMA AS SCHEMA_NAME,\r\n TABLE_NAME AS TBL_DEF_KEY,\r\n COLUMN_NAME AS COL_DEF_KEY,\r\n INDEX_COMMENT AS DEF_NAME,\r\n COMMENT AS INTRO,\r\n IF (NON_UNIQUE = 1, 'NORMAL', 'UNIQUE') AS TYPE,\r\n SEQ_IN_INDEX AS ORDER_VALUE,\r\n IF (COLLATION = 'A', 'ASC', 'DESC') AS SORT_TYPE,\r\n INDEX_NAME AS DEF_KEY FROM information_schema.STATISTICS\r\nWHERE INDEX_SCHEMA IN (:schemaName) AND CONCAT(INDEX_SCHEMA, '.', TABLE_NAME) IN (:sysTableNames) AND INDEX_NAME != 'PRIMARY'\r\nORDER BY INDEX_SCHEMA,TBL_DEF_KEY, DEF_KEY, ORDER_VALUE", + "metaQueryCharset": null, + "orderValue": 0, + "isEnabled": 1, + "id": "BPMCJTYLY2UAC" + }, + { + "defKey": "Oracle", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "ojdbc6-11.2.0.4.jar", + "jdbcReferDriver": "oracle.jdbc.driver.OracleDriver", + "jdbcReferUrl": "jdbc:oracle:thin:@//[ip]:[port]/helowin", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\nBEGIN\r\n EXECUTE IMMEDIATE 'DROP TABLE {{= tableKey }}';\r\nEXCEPTION\r\n WHEN OTHERS THEN\r\n IF SQLCODE != -942 THEN -- Table does not exist error\r\n RAISE;\r\n END IF;\r\nEND;\r\n/\r\n\r\nCREATE TABLE {{= tableKey }} (\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{=field.dbDataType}}{{? \r\n field.dbDataType?.toUpperCase() === 'VARCHAR2'\r\n }} ({{=field.dataLen ? field.dataLen : 128}}) {{??\r\n field.dbDataType?.toUpperCase() === 'TIMESTAMP'\r\n }} {{? field.dataLen }} {{? field.dataLen >= 0 && field.dataLen <= 9}} ({{=field.dataLen}}) {{??}} (6) {{?}} {{?? }} (6) {{?}} {{??\r\n field.dbDataType?.toUpperCase() === 'INTEGER' ||\r\n field.dbDataType?.toUpperCase() === 'BINARY_DOUBLE' ||\r\n field.dbDataType?.toUpperCase() === 'DATE' ||\r\n field.dbDataType?.toUpperCase() === 'CLOB' ||\r\n field.dbDataType?.toUpperCase() === 'LONG' ||\r\n field.dbDataType?.toUpperCase() === 'NCLOB' ||\r\n field.dbDataType?.toUpperCase() === 'BLOB' \r\n }} {{??\r\n field.dbDataType?.toUpperCase() === 'FLOAT'\r\n }} {{? field.dataLen && field.dataLen >= 1 && field.dataLen <= 126}} ({{=field.dataLen}}) {{?}} {{?? \r\n field.dbDataType?.toUpperCase() === 'DECIMAL' ||\r\n field.dbDataType?.toUpperCase() === 'NUMBER' \r\n }}{{? field.dataLen && field.dataLen >= 1 && field.dataLen <= 38}}{{? field.numScale && field.numScale >= -84 && field.numScale <= 127}}({{=field.dataLen}},{{=field.numScale}}){{??}}({{=field.dataLen}}) {{?}}{{?}}{{?? \r\n field.dataLen && field.dataLen >= 0\r\n }}({{=field.dataLen}}){{?}}{{= field.autoIncrement ? '' : '' }}{{? field.defaultValue }} DEFAULT {{=field.defaultValue}} {{?}}{{=field.notNull?'NOT NULL' : '' }}{{= index < it.fields.length-1 ? ',' : ( pkList.length > 0 ? ',' : '' ) }} {{~}}\r\n{{? pkList.length > 0 }} \r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i < pkList.length-1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n);\r\n\r\n{{? it.defName || it.intro }} \r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n{{?}}\r\n\r\n{{~it.fields:field:index}}\r\n{{? field.defName || field.intro }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n$blankline", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD CONSTRAINT {{=it.defKey}}_PRIMARY_KEY PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}'; \r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}\r\nALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};\r\n{{?}}", + "tableDelete": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\nBEGIN\r\n EXECUTE IMMEDIATE 'DROP TABLE {{= tableKey }}';\r\nEXCEPTION\r\n WHEN OTHERS THEN\r\n IF SQLCODE != -942 THEN -- Table does not exist error\r\n RAISE;\r\n END IF;\r\nEND;", + "columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeDataLen = (dataLen, maxDataLen, defaultDataLen) => {\r\n if(!dataLen) {\r\n return defaultDataLen;\r\n }\r\n if(dataLen >= 0 && dataLen <= maxDataLen) {\r\n return dataLen;\r\n }\r\n return defaultDataLen;\r\n \r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR2') {\r\n return `${dbDataType} (${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType} (${computeDataLen(dataLen, 9, 6)})`;\r\n } else if(dbDataType.toUpperCase() === 'INTEGER' ||\r\n dbDataType.toUpperCase() === 'BINARY_DOUBLE' ||\r\n dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'CLOB' ||\r\n dbDataType.toUpperCase() === 'LONG' ||\r\n dbDataType.toUpperCase() === 'NCLOB' ||\r\n dbDataType.toUpperCase() === 'BLOB') {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 126) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL' ||\r\n dbDataType.toUpperCase() === 'NUMBER') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= -84 && numScale <= 127) ? `(${dataLen},${numScale})` : `(${dataLen})`) : ''}`; \r\n } else if(dataLen && dataLen >= 0) {\r\n return `${dbDataType} (${dataLen})`\r\n }\r\n return dbDataType;\r\n \r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const finalDataType = computeDatatype(field);\r\n}}\r\nALTER TABLE {{= tableKey }} ADD {{= field.defKey }} {{= finalDataType }}{{? field.defaultValue}} DEFAULT {{=field.defaultValue}} {{?}}{{? field.notNull}} NOT NULL{{?}};\r\n{{? field.defName || field.intro }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}", + "columnUpdate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n let updateIndexData = it.updateIndexData;\r\n const computeDataLen = (dataLen, maxDataLen, defaultDataLen) => {\r\n if(!dataLen) {\r\n return defaultDataLen;\r\n }\r\n if(dataLen >= 0 && dataLen <= maxDataLen) {\r\n return dataLen;\r\n }\r\n return defaultDataLen;\r\n \r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR2') {\r\n return `${dbDataType} (${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType} (${computeDataLen(dataLen, 9, 6)})`;\r\n } else if(dbDataType.toUpperCase() === 'INTEGER' ||\r\n dbDataType.toUpperCase() === 'BINARY_DOUBLE' ||\r\n dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'CLOB' ||\r\n dbDataType.toUpperCase() === 'LONG' ||\r\n dbDataType.toUpperCase() === 'NCLOB' ||\r\n dbDataType.toUpperCase() === 'BLOB') {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 126) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL' ||\r\n dbDataType.toUpperCase() === 'NUMBER') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= -84 && numScale <= 127) ? `(${dataLen},${numScale})` : `(${dataLen})`) : ''}`; \r\n } else if(dataLen && dataLen >= 0) {\r\n return `${dbDataType} (${dataLen})`\r\n }\r\n return dbDataType;\r\n \r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~updateIndexData:updateIndex:index}}\r\n{{? updateIndex?.fieldsUpdate?.length > 0 }}\r\nBEGIN\r\n EXECUTE IMMEDIATE 'DROP INDEX {{= schemaName }}{{= updateIndex?.defKey }}';\r\nEXCEPTION\r\n WHEN OTHERS THEN\r\n IF SQLCODE!= -1418 THEN -- Index does not exist error\r\n RAISE;\r\n END IF;\r\nEND;\r\n{{?}}\r\n{{~}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n const finalDataType = computeDatatype(field);\r\n const preDefKey = field?.baseUpdate?.pre?.defKey;\r\n const nextDefKey = field?.baseUpdate?.next?.defKey;\r\n}}\r\n{{? updateKeys.includes('defKey') }}\r\nALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale') }}\r\nALTER TABLE {{= tableKey }} MODIFY {{=field.defKey}} {{=finalDataType}};\r\n{{?}}\r\n{{? updateKeys.includes('notNull') }}\r\nALTER TABLE {{= tableKey }} MODIFY {{=field.defKey}} {{? field.notNull }} NOT NULL {{??}} NULL {{?}};\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.includes('defaultValue') }}\r\nALTER TABLE {{= tableKey }} MODIFY {{=field.defKey}} DEFAULT {{=field.defaultValue}};\r\n{{?}}\r\n{{~}}", + "columnDelete": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\r\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\r\n {{~row.fields:field:idx}}\r\n -- {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{=field.fieldDefKey}} {{='ASC'}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nBEGIN\n EXECUTE IMMEDIATE 'DROP INDEX {{= schemaName }}{{? preDefKey}}{{= preDefKey}}{{??}}{{=row.defKey}}{{?}}';\nEXCEPTION\n WHEN OTHERS THEN\n IF SQLCODE!= -1418 THEN -- Index does not exist error\n RAISE;\n END IF;\nEND;\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\r\n let indexesUpdate = it.indexesUpdate; \r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~indexesUpdate:row:i}}\r\nBEGIN\r\n EXECUTE IMMEDIATE 'DROP INDEX {{= schemaName }}{{=row.defKey}}';\r\nEXCEPTION\r\n WHEN OTHERS THEN\r\n IF SQLCODE!= -1418 THEN -- Index does not exist error\r\n RAISE;\r\n END IF;\r\nEND;\r\n{{~}}", + "metaTableQuery": "SELECT\n\t\t'' as id,\n t.table_name AS def_key,\n c.comments AS def_name,\n t.OWNER AS schema_name\nFROM all_tables t left join all_tab_comments c on t.OWNER=c.OWNER and t.TABLE_NAME=c.TABLE_NAME\nwhere t.OWNER in (:schemaName) order by def_key", + "metaColumnQuery": "SELECT\n col.owner AS schema_name,\n\tcol.table_name AS tbl_def_key,\n\tcol.column_id AS order_value,\n\tcol.column_name AS def_key,\n\tclc.comments AS def_name,\n\t'' AS intro,\n\tcol.data_type AS db_data_type,\n\tnvl(col.data_precision,col.data_length) AS data_len,\n\tcol.data_scale AS num_scale,\n\tdecode(col.nullable,'Y',0,1) AS not_null,\n\tCASE WHEN cc.constraint_name IS NOT NULL THEN 1 ELSE 0 END AS primary_key,\n\t'' AS auto_increment,\n\tcol.data_default AS default_value\nFROM\n\tall_tab_columns col LEFT JOIN all_col_comments clc ON col.OWNER = clc.OWNER AND col.table_name = clc.table_name AND col.column_name = clc.column_name \n\t LEFT JOIN (all_cons_columns cc JOIN all_constraints cs ON cc.constraint_name = cs.constraint_name AND cc.owner = cs.owner and cs.constraint_type = 'P') on col.owner=cc.owner and col.table_name=cc.table_name and col.column_name = cc.column_name\nWHERE\n\tcol.owner in (:schemaName)\n\tAND CONCAT(CONCAT(col.owner, '.') , col.table_name) in (:sysTableNames)\nORDER BY\n\tcol.owner ASC, col.table_name ASC,col.column_id ASC ", + "metaIndexQuery": "SELECT i.owner AS schema_name,\r\n i.table_name AS TBL_DEF_KEY,\r\n ic.column_name AS COL_DEF_KEY,\r\n DATA_DEFAULT AS VIRTUAL_COL_DEF_KEY,\r\n i.index_name AS DEF_KEY,\r\n CASE\r\n WHEN i.uniqueness = 'UNIQUE' THEN 'UNIQUE'\r\n ELSE 'NORMAL'\r\n END AS TYPE,\r\n CASE\r\n WHEN ic.descend = 'DESC' THEN 'DESC'\r\n ELSE 'ASC'\r\n END AS SORT_TYPE,\r\n ic.column_position AS ORDER_VALUE,\r\n NULL AS INTRO -- Oracle does not have a direct equivalent for INDEX_COMMENT\r\nFROM all_indexes i\r\n LEFT JOIN all_ind_columns ic ON i.index_name = ic.index_name AND i.table_name = ic.table_name\r\n LEFT JOIN ALL_TAB_COLS co ON (co.table_name = i.table_name AND co.column_name = ic.column_name)\r\nWHERE i.owner in (:schemaName)\r\n AND CONCAT(CONCAT(i.owner, '.') , i.table_name) IN (:sysTableNames)\r\n AND co.owner in (:schemaName)\r\n -- AND NULLABLE = 'Y'\r\n AND GENERATED = 'N'--是否是自动生成\r\nORDER BY i.owner, i.table_name, i.index_name, ic.column_position", + "metaQueryCharset": null, + "orderValue": 1, + "isEnabled": 0, + "id": "BPMCJTYLY0UAC" + }, + { + "defKey": "PostgreSQL", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "postgresql-42.7.3.jar", + "jdbcReferDriver": "org.postgresql.Driver", + "jdbcReferUrl": "jdbc:postgresql://[ip]:[port]/[dbname]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n const dataTypeArray = [\r\n 'INT2',\r\n 'INT4',\r\n 'INT',\r\n 'INT8',\r\n 'SERIAL2',\r\n 'SERIAL4',\r\n 'SERIAL8',\r\n 'FLOAT4',\r\n 'FLOAT8',\r\n 'MONEY',\r\n 'TEXT',\r\n 'BYTEA',\r\n 'BOOLEAN',\r\n 'JSONB',\r\n 'JSON',\r\n 'DATE'\r\n ];\r\n\r\n function getDataType(field) {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(autoIncrement) {\r\n return dbDataType.toUpperCase() === 'INT8' ? 'BIGSERIAL' : 'SERIAL';\r\n }\r\n if(dataTypeArray.includes(dbDataType.toUpperCase())) {\r\n return dbDataType;\r\n }\r\n if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n if(dataLen && dataLen >= 1 && dataLen <= 1000) {\r\n if(numScale && numScale >= 0 && numScale <= dataLen) {\r\n return `${dbDataType}(${dataLen},${numScale})`;\r\n } else {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n }\r\n return dbDataType;\r\n }\r\n if(dataLen && dataLen >= 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return dbDataType;\r\n }\r\n\r\n function getConstraints(field) {\r\n let constraints = '';\r\n if (field.notNull) {\r\n constraints += ' NOT NULL';\r\n }\r\n if (field.defaultValue) {\r\n constraints += ` DEFAULT ${field.defaultValue}`;\r\n }\r\n return constraints;\r\n }\r\n}}\r\n\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}{{=field.defKey}} {{= getDataType(field) }}{{= getConstraints(field) }}{{= index < it.fields.length-1 || pkList.length>0 ? ',' : '' }}\r\n{{~}}\r\n{{? pkList.length > 0 }} PRIMARY KEY ({{= pkList.join(',')}}){{?}}\r\n);\r\n\r\n{{~it.fields:field:index}}\r\n{{? field.defName || field.intro }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n\r\n{{? it.defName || it.intro }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n{{?}}\r\n$blankline", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nDO $$\r\n DECLARE\r\n pk_constraint_name text;\r\n BEGIN\r\n SELECT constraint_name\r\n INTO pk_constraint_name\r\n FROM information_schema.table_constraints\r\n WHERE table_name = '{{=it.defKey}}' AND constraint_type = 'PRIMARY KEY'\r\n LIMIT 1;\r\n\r\n IF pk_constraint_name IS NOT NULL THEN\r\n EXECUTE 'ALTER TABLE {{= schemaName }}{{=it.defKey}} DROP CONSTRAINT ' || pk_constraint_name;\r\n ELSE\r\n RAISE NOTICE 'No primary key constraint found for the table.';\r\n END IF;\r\nEND $$;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}\"{{= field.defKey }}\"{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}COMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}';{{?}}\r\n$blankline\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};\n$blankline", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'INT8' ? 'BIGSERIAL' : 'SERIAL';\n }\n if(dbDataType.toUpperCase() === 'INT2' ||\n dbDataType.toUpperCase() === 'INT4' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'SERIAL2' ||\n dbDataType.toUpperCase() === 'SERIAL4' ||\n dbDataType.toUpperCase() === 'SERIAL8' ||\n dbDataType.toUpperCase() === 'FLOAT4' ||\n dbDataType.toUpperCase() === 'FLOAT8' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'JSONB' ||\n dbDataType.toUpperCase() === 'JSON' ||\n dbDataType.toUpperCase() === 'DATE') {\n return dbDataType;\n }\n if(dbDataType.toUpperCase() === 'DECIMAL') {\n if(dataLen && dataLen >= 1 && dataLen <= 1000) {\n if(numScale && numScale >= 0 && numScale <= dataLen) {\n return `${dbDataType}(${dataLen},${numScale})`;\n } else {\n return `${dbDataType}(${dataLen})`;\n }\n }\n return dbDataType;\n }\n if(dataLen && dataLen >= 0) {\n return `${dbDataType}(${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey }} {{= finalDataType }}{{? field.notNull }} NOT NULL{{?}};\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{? field.defaultValue !== null && field.defaultValue !== undefined && field.defaultValue !== ''}}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} SET DEFAULT {{=field.defaultValue}};\n{{?}}\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'INT8' ? 'BIGSERIAL' : 'SERIAL';\n }\n if(dbDataType.toUpperCase() === 'INT2' ||\n dbDataType.toUpperCase() === 'INT4' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'SERIAL2' ||\n dbDataType.toUpperCase() === 'SERIAL4' ||\n dbDataType.toUpperCase() === 'SERIAL8' ||\n dbDataType.toUpperCase() === 'FLOAT4' ||\n dbDataType.toUpperCase() === 'FLOAT8' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'JSONB' ||\n dbDataType.toUpperCase() === 'JSON' ||\n dbDataType.toUpperCase() === 'DATE') {\n return dbDataType;\n }\n if(dbDataType.toUpperCase() === 'DECIMAL') {\n if(dataLen && dataLen >= 1 && dataLen <= 1000) {\n if(numScale && numScale >= 0 && numScale <= dataLen) {\n return `${dbDataType}(${dataLen},${numScale})`;\n } else {\n return `${dbDataType}(${dataLen})`;\n }\n }\n return dbDataType;\n }\n if(dataLen && dataLen >= 0) {\n return `${dbDataType}(${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} DROP default;\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} TYPE {{=finalDataType}} USING '{{= field.defKey}}'::{{=finalDataType}};\n{{?}}\n{{? updateKeys.includes('notNull') }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}}{{? field.notNull }} SET {{??}} DROP {{?}} NOT NULL;{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nCOMMENT ON COLUMN {{= tableKey}}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{? updateKeys.includes('defaultValue') }}\nALTER TABLE {{= tableKey}} ALTER COLUMN {{= field.defKey}}{{? field.defaultValue }} SET DEFAULT {{=field.defaultValue}}{{??}} DROP default{{?}};\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}}INDEX {{=row.defKey}} ON {{= tableKey }} (\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\r\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{= schemaName }}{{? preDefKey}}{{= preDefKey}}{{??}}{{=row.defKey}}{{?}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{?}}\n{{??}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{= schemaName }}{{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT\r\n tb.TABLE_NAME as def_key,\r\n d.description as def_name,\r\n tb.table_schema as schema_name\r\nFROM\r\n information_schema.tables tb\r\n JOIN pg_class C ON C.relname = tb.TABLE_NAME\r\n JOIN pg_namespace n ON tb.table_schema = n.nspname AND c.relnamespace = n.oid\r\n LEFT JOIN pg_description d ON d.objoid = C.oid\r\n AND d.objsubid = '0'\r\nWHERE\r\n tb.table_schema IN (:schemaName)\r\nORDER BY\r\n\ttb.table_schema asc", + "metaColumnQuery": "SELECT\r\n col.table_schema as schema_name,\r\n col.TABLE_NAME AS tbl_def_key,\r\n col.ordinal_position AS order_value,\r\n col.COLUMN_NAME AS def_key,\r\n d.description AS def_name,\r\n\t\t'' AS intro,\r\n col.udt_name AS db_data_type,\r\n\t\tCASE WHEN col.character_maximum_length IS NULL AND col.numeric_precision IS NOT NULL THEN col.numeric_precision\r\n\t\t ELSE col.character_maximum_length\r\n\t\tEND AS data_len,\r\n\t\tCASE WHEN col.numeric_precision IS NOT NULL THEN (CASE WHEN col.numeric_scale = 0 THEN NULL ELSE col.numeric_scale END)\r\n\t\t\t\tELSE NULL\r\n\t\tEND AS num_scale,\r\n CASE WHEN kc.column_name IS NOT NULL THEN 1 ELSE 0 END AS primary_key,\r\n CASE WHEN col.IS_NULLABLE = 'NO' THEN 1 ELSE 0 END AS not_null,\r\n CASE WHEN col.COLUMN_DEFAULT LIKE 'nextval%' THEN 1 ELSE 0 END AS auto_increment,\r\n\t\tsubstr(col.column_default,0,strpos(col.column_default, concat('::',col.data_type))) AS default_value\r\nFROM\r\n information_schema.COLUMNS col LEFT JOIN (information_schema.key_column_usage kc LEFT JOIN information_schema.table_constraints tc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tON\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkc.constraint_name = tc.constraint_name\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand tc.constraint_type = 'PRIMARY KEY'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand kc.table_schema=tc.table_schema\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand kc.table_name=tc.table_schema\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) ON\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcol.TABLE_NAME = kc.table_name\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND col.COLUMN_NAME = kc.column_name AND kc.table_schema = col.table_schema\r\nLEFT JOIN pg_class C ON C.relname = col.TABLE_NAME\r\nLEFT JOIN pg_namespace n ON col.table_schema = n.nspname AND c.relnamespace = n.oid\r\nLEFT JOIN pg_description d ON d.objoid = C.oid AND d.objsubid = col.ordinal_position\r\nWHERE\r\n col.table_schema IN (:schemaName)\r\n AND nspName IN (:schemaName)\r\n AND CONCAT(col.table_schema, '.', col.TABLE_NAME) IN (:sysTableNames)\r\nORDER BY\r\n\tcol.table_schema asc, col.TABLE_NAME asc,col.ordinal_position ASC\r\n", + "metaIndexQuery": "SELECT ns.nspname AS schema_name, \r\n t.relname AS tbl_def_key,\r\n a.attname AS col_def_key,\r\n d.description AS def_name,\r\n '' AS intro,\r\n CASE\r\n WHEN ix.indoption[array_position(ix.indkey, a.attnum) - 1] & 1 = 0 THEN 'ASC'\r\n ELSE 'DESC'\r\n END AS sort_type,\r\n CASE\r\n WHEN ix.indisunique THEN 'UNIQUE'\r\n ELSE 'NORMAL'\r\n END AS type,\r\n array_position(ix.indkey, a.attnum) AS order_value,\r\n idx.relname AS def_key\r\nFROM pg_class t\r\n JOIN\r\n pg_namespace ns ON ns.oid = t.relnamespace\r\n JOIN\r\n pg_index ix ON t.oid = ix.indrelid\r\n JOIN\r\n pg_class idx ON ix.indexrelid = idx.oid\r\n JOIN\r\n unnest(ix.indkey) WITH ORDINALITY AS key_col(attnum, ord) ON true\r\n JOIN\r\n pg_attribute a ON t.oid = a.attrelid AND a.attnum = key_col.attnum\r\n LEFT JOIN\r\n pg_description d ON idx.oid = d.objoid\r\nWHERE ns.nspname IN (:schemaName)\r\n AND CONCAT(ns.nspname, '.', t.relname) IN (:sysTableNames)\r\n AND indisprimary = false \r\nORDER BY ns.nspname asc, tbl_def_key, def_key", + "metaQueryCharset": null, + "orderValue": 2, + "isEnabled": 0, + "id": "BPMCJTYLF1UAC" + }, + { + "defKey": "SQLServer", + "defName": null, + "icon": "", + "driverFiles": "mssql-jdbc-12.6.2.jre11.jar", + "jdbcReferDriver": "com.microsoft.sqlserver.jdbc.SQLServerDriver", + "jdbcReferUrl": "jdbc:sqlserver://[ip]:[port];databaseName=[databaseName];encrypt=true;trustServerCertificate=true", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\r\n const tableKey = `${schemaName}.${it.defKey}`;\r\n\r\n const dataTypeArray = [\r\n 'TINYINT',\r\n 'SMALLINT',\r\n 'INT',\r\n 'BIGINT',\r\n 'REAL',\r\n 'DATE',\r\n 'DATETIME',\r\n 'TIMESTAMP',\r\n 'MONEY',\r\n 'BIT',\r\n 'TEXT'\r\n ];\r\n\r\n function getDataType(field) {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(autoIncrement) {\r\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGINT IDENTITY(1,1)' : 'INT IDENTITY(1,1)';\r\n }\r\n if(dataTypeArray.includes(dbDataType.toUpperCase())) {\r\n return dbDataType;\r\n }\r\n if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n if(dataLen && dataLen >= 1 && dataLen <= 38) {\r\n if(numScale && numScale >= 0 && numScale <= dataLen) {\r\n return `${dbDataType}(${dataLen},${numScale})`;\r\n } else {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n }\r\n return dbDataType;\r\n }\r\n if(dbDataType.toUpperCase() === 'TIME' && dataLen && dataLen >= 1 && dataLen <= 7) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n if(dbDataType.toUpperCase() === 'FLOAT' && dataLen && dataLen >= 1 && dataLen <= 53) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n if(dataLen && dataLen >= 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return dbDataType;\r\n }\r\n\r\n function getConstraints(field) {\r\n let constraints = '';\r\n if (field.notNull) {\r\n constraints += ' NOT NULL';\r\n }\r\n if (!field.notNull) {\r\n constraints += ' NULL';\r\n }\r\n if (field.defaultValue) {\r\n constraints += ` DEFAULT ${field.defaultValue}`;\r\n }\r\n return constraints;\r\n }\r\n}}\r\n\r\nIF OBJECT_ID('{{= tableKey }}','U') IS NOT NULL \r\n DROP TABLE {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push('[' + field.defKey + ']') }}{{?}} \r\n [{{=field.defKey}}] {{= getDataType(field) }}{{= getConstraints(field) }}{{= index < it.fields.length-1 || pkList.length>0 ? ',' : '' }} \r\n{{~}}\r\n{{? pkList.length > 0 }} PRIMARY KEY ({{= pkList.join(', ')}}){{?}}\r\n);\r\n\r\n{{~it.fields:field:index}}\r\n{{? field.defName || field.intro }}\r\nEXEC sp_addextendedproperty \r\n @name = N'MS_Description', \r\n @value = N'{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}', \r\n @level0type = N'SCHEMA', @level0name = N'{{=schemaName}}', \r\n @level1type = N'TABLE', @level1name = N'{{=it.defKey}}', \r\n @level2type = N'COLUMN', @level2name = N'{{=field.defKey}}';\r\n{{?}}\r\n{{~}}\r\n\r\n{{? it.defName || it.intro }}\r\nEXEC sp_addextendedproperty \r\n @name = N'MS_Description', \r\n @value = N'{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}', \r\n @level0type = N'SCHEMA', @level0name = N'{{=schemaName}}', \r\n @level1type = N'TABLE', @level1name = N'{{=it.defKey}}';\r\n{{?}}\r\n$blankline\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\r\n const tableKey = `${schemaName}.${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nBEGIN\r\nDECLARE @constraint_name NVARCHAR(128);\r\nDECLARE @sql NVARCHAR(MAX);\r\n\r\nSELECT @constraint_name = name\r\nFROM sys.key_constraints\r\nWHERE type = 'PK'\r\n AND OBJECT_NAME(parent_object_id) = '{{=it.defKey}}' \r\n AND SCHEMA_NAME(schema_id) = '{{= schemaName }}';\r\n\r\nIF @constraint_name IS NOT NULL\r\n BEGIN\r\n SET @sql = 'ALTER TABLE {{= tableKey}} DROP CONSTRAINT ' + QUOTENAME(@constraint_name);\r\n EXEC sp_executesql @sql;\r\n END\r\nEND\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nEXEC sp_updateextendedproperty \r\n @name = N'MS_Description', \r\n @value = N'{{=it.func.strJoin(defName, intro, \";\", true)}}', \r\n @level0type = N'SCHEMA', @level0name = N'{{= schemaName }}', \r\n @level1type = N'TABLE', @level1name = N'{{=it.defKey}}';\r\n{{?}}\r\n$blankline\r\n{{? updateKeys.some((item) => item === 'defKey') }}EXEC sp_rename '{{= tableKey }}', '{{=defKey}}'; {{?}}", + "tableDelete": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\r\n const tableKey = `${schemaName}.${it.defKey}`;\r\n}}\r\nIF OBJECT_ID('{{= tableKey }}', 'U') IS NOT NULL \r\n DROP TABLE {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGINT IDENTITY(1,1)' : 'INT IDENTITY(1,1)';\n }\n if(dbDataType.toUpperCase() === 'TINYINT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'TIMESTAMP' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'BIT' ||\n dbDataType.toUpperCase() === 'TEXT') {\n return dbDataType; \n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIME' ) {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 7) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 53) ? `(${dataLen})` : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\n const tableKey = `${schemaName}.${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD {{= field.defKey}} {{= finalDataType}}{{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}};\n{{? field.defName || field.intro }}\nEXEC sp_addextendedproperty \n @name = N'MS_Description', \n @value = N'{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}', \n @level0type = N'SCHEMA', @level0name = N'{{= schemaName }}',\n @level1type = N'TABLE', @level1name = N'{{= it.defKey}}',\n @level2type = N'COLUMN', @level2name = N'{{= field.defKey}}';\n{{?}}\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGINT IDENTITY(1,1)' : 'INT IDENTITY(1,1)';\n }\n if(dbDataType.toUpperCase() === 'TINYINT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'TIMESTAMP' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'BIT' ||\n dbDataType.toUpperCase() === 'TEXT') {\n return dbDataType; \n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= field.dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIME' ) {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 7) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 53) ? `(${dataLen})` : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\n const tableKey = `${schemaName}.${it.defKey}`;\n let updateIndexData = it.updateIndexData;\n}}\n{{~updateIndexData:row:index}}\n{{? row?.fieldsUpdate?.length > 0 }}\nIF EXISTS (SELECT * FROM sys.indexes WHERE name = '{{=row.defKey}}' AND object_id = OBJECT_ID('{{= tableKey }}'))\n DROP INDEX {{=row.defKey}} ON {{= tableKey }};\n{{?}}\n{{~}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defaultValue') }}\nBEGIN\n DECLARE @constraint_name NVARCHAR(255);\n\n SELECT @constraint_name = name\n FROM sys.default_constraints\n WHERE parent_object_id = OBJECT_ID('{{= tableKey }}') \n AND parent_column_id = (SELECT column_id FROM sys.columns WHERE object_id = OBJECT_ID('{{= tableKey }}') AND name = '{{= preDefKey }}');\n \n IF @constraint_name IS NOT NULL\n BEGIN\n EXEC('ALTER TABLE {{= tableKey }} DROP CONSTRAINT ' + @constraint_name);\n END\nEND\n{{?}}\n{{? updateKeys.includes('defKey') }}EXEC sp_rename '{{= tableKey }}.{{= preDefKey}}', '{{= nextDefKey}}', 'COLUMN';{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'notNull' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{=finalDataType}}{{? field.notNull}} NOT NULL{{?}};\n{{?}}\n{{? updateKeys.includes('defaultValue') }}ALTER TABLE {{= tableKey }} ADD DEFAULT {{= field.defaultValue}} FOR {{= field.defKey}};{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nEXEC sp_updateextendedproperty \n @name = N'MS_Description', \n @value = N'{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}', \n @level0type = N'SCHEMA', @level0name = N'{{=schemaName}}', \n @level1type = N'TABLE', @level1name = N'{{=it.defKey}}', \n @level2type = N'COLUMN', @level2name = N'{{=field.defKey}}';\n{{?}}\n{{~}}", + "columnDelete": "{{\r\n let fieldsUpdate = it.fieldsUpdate; \r\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\r\n const tableKey = `${schemaName}.${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nBEGIN\r\n DECLARE @constraint_name NVARCHAR(255);\r\n \r\n SELECT @constraint_name = name\r\n FROM sys.default_constraints\r\n WHERE parent_object_id = OBJECT_ID('{{= tableKey }}') \r\n AND parent_column_id = (SELECT column_id FROM sys.columns WHERE object_id = OBJECT_ID('{{= tableKey }}') AND name = '{{= field.defKey }}');\r\n \r\n IF @constraint_name IS NOT NULL\r\n EXEC('ALTER TABLE {{= tableKey }} DROP CONSTRAINT ' + @constraint_name);\r\n IF EXISTS (SELECT * FROM sys.columns WHERE name = '{{=field.defKey}}' AND object_id = OBJECT_ID('{{= tableKey }}'))\r\n ALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\r\nEND\r\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\r\n const tableKey = `${schemaName}.${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n [{{=field.fieldDefKey}}] {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{? row.defName || row.intro }}\r\nEXEC sp_addextendedproperty \r\n @name = N'MS_Description', \r\n @value = N'{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}', \r\n @level0type = N'SCHEMA', @level0name = N'{{= schemaName }}', \r\n @level1type = N'TABLE', @level1name = N'{{= it.defKey }}', \r\n @level2type = N'INDEX', @level2name = N'{{= row.defKey }}';\r\n{{?}}\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\n const tableKey = `${schemaName}.${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nIF EXISTS (SELECT * FROM sys.indexes WHERE name = '{{= preDefKey}}' AND object_id = OBJECT_ID('{{=it.defKey}}'))\nBEGIN\n DROP INDEX {{= preDefKey}} ON {{= tableKey }};\nEND\nGO\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{=it.defKey}} (\n {{~row.fields:field:idx}}\n [{{=field.fieldDefKey}}] {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{? row.defName || row.intro }}\nEXEC sp_addextendedproperty \n @name = N'MS_Description', \n @value = N'{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}', \n @level0type = N'SCHEMA', @level0name = N'{{= schemaName }}', \n @level1type = N'TABLE', @level1name = N'{{= it.defKey }}', \n @level2type = N'INDEX', @level2name = N'{{= row.defKey }}';\n{{?}}\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\r\n let indexesUpdate = it.indexesUpdate; \r\n let schemaName = it.schemaName ? `${it.schemaName}` : 'dbo';\r\n const tableKey = `${schemaName}.${it.defKey}`;\r\n}}\r\n{{~indexesUpdate:row:i}}\r\nIF EXISTS (SELECT * FROM sys.indexes WHERE name = '{{=row.defKey}}' AND object_id = OBJECT_ID('{{= tableKey }}'))\r\nBEGIN\r\n DROP INDEX {{=row.defKey}} ON {{= tableKey }};\r\nEND\r\nGO\r\n{{~}}", + "metaTableQuery": "SELECT\n tab.name AS def_key,\n ep.value AS def_name,\n sch.name AS schema_name\nFROM sys.schemas sch JOIN sys.tables tab ON sch.schema_id = tab.schema_id\n LEFT JOIN sys.extended_properties ep ON tab.object_id = ep.major_id\n AND ep.minor_id = 0\n AND ep.name = 'MS_Description'\n AND ep.class = 1\nWHERE sch.name IN (:schemaName);", + "metaColumnQuery": "SELECT\r\n schema_name = sch.name,\r\n tbl_def_key = tab.name,\r\n order_value = col.column_id,\r\n def_key = col.name,\r\n def_name = ep.value,\r\n intro = '',\r\n db_data_type = t.name,\r\n data_len = IIF(col.max_length = 0, null, col.max_length),\r\n num_scale = IIF(col.scale = 0, null, col.scale),\r\n primary_key = ISNULL((\r\n SELECT\r\n 1\r\n FROM\r\n information_schema.table_constraints AS tc,\r\n information_schema.key_column_usage AS kcu\r\n WHERE tc.constraint_name = kcu.constraint_name\r\n AND tc.constraint_type = 'PRIMARY KEY'\r\n AND tc.table_name = tab.name\r\n AND tc.CONSTRAINT_SCHEMA = sch.name\r\n AND kcu.column_name= col.name\r\n ),0),\r\n not_null= IIF(col.is_nullable = 1, 0, 1),\r\n auto_increment = is_identity,\r\n default_value = ISNULL(REPLACE(REPLACE(dc.definition,'(',''), ')',''),'') -- ISNULL(dc.definition, '')\r\nFROM\r\n sys.schemas sch\r\n INNER JOIN sys.tables tab\r\n ON sch.schema_id = tab.schema_id\r\n INNER JOIN sys.columns col\r\n ON tab.object_id = col.object_id\r\n LEFT JOIN sys.extended_properties ep\r\n ON tab.object_id = ep.major_id\r\n AND col.column_id = ep.minor_id\r\n AND ep.name = 'MS_Description'\r\n AND ep.class = 1\r\n LEFT JOIN sys.types t ON col.system_type_id = t.system_type_id AND col.user_type_id = t.user_type_id\r\n LEFT JOIN sys.default_constraints dc ON dc.object_id = col.default_object_id\r\nwhere sch.name IN (:schemaName) AND CONCAT(sch.name, '.', tab.name) IN (:sysTableNames)\r\nORDER BY sch.name,tbl_def_key, order_value", + "metaIndexQuery": "SELECT\r\n sch.name AS schema_name,\r\n tab.name AS TBL_DEF_KEY,\r\n col.name AS COL_DEF_KEY,\r\n i.name AS DEF_KEY,\r\n ep.value AS def_name,\r\n IIF(i.is_unique = 1, 'UNIQUE', 'NORMAL') AS TYPE,\r\n IIF(ic.is_descending_key = 1, 'DESC', 'ASC') AS SORT_TYPE,\r\n ic.key_ordinal AS ORDER_VALUE,\r\n '' AS INTRO\r\nFROM\r\n sys.schemas sch LEFT JOIN sys.tables tab\r\n ON sch.schema_id = tab.schema_id\r\n LEFT JOIN sys.indexes i\r\n ON i.object_id = tab.object_id\r\n LEFT JOIN sys.index_columns ic\r\n ON i.object_id = ic.object_id AND i.index_id = ic.index_id\r\n LEFT JOIN sys.columns col\r\n ON ic.object_id = col.object_id AND ic.column_id = col.column_id\r\n LEFT JOIN sys.extended_properties ep\r\n ON tab.object_id = ep.major_id\r\n AND i.index_id = ep.minor_id\r\n AND ep.name = 'MS_Description'\r\n AND ep.class = 7\r\nWHERE sch.name in (:schemaName) AND CONCAT(sch.name, '.', tab.name) IN (:sysTableNames) AND is_primary_key = 0 AND i.type IN (1, 2)\r\nORDER BY sch.name,TBL_DEF_KEY, ORDER_VALUE\r\n", + "metaQueryCharset": null, + "orderValue": 3, + "isEnabled": 0, + "id": "BPMCJTYLF2UAC" + }, + { + "defKey": "DB2", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "db2jcc4.jar", + "jdbcReferDriver": "com.ibm.db2.jcc.DB2Driver", + "jdbcReferUrl": "jdbc:db2://[ip]:[port]/[schemaName]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n let dataType = dbDataType.toUpperCase();\r\n if(['NVARCHAR','VARCHAR'].includes(dataType)){\r\n dataType = `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n return dataType;\r\n }else if(dataType=='CHAR'){\r\n dataType = field.dataLen && field.dataLen>=0 && field.dataLen <=255 ? `${dataType}(${field.dataLen})`:`${dataType}`;\r\n return dataType;\r\n }else if(dataType=='NCHAR'){\r\n dataType = field.dataLen && field.dataLen>=0 && field.dataLen <=63 ? `${dataType}(${field.dataLen})`:`${dataType}`;\r\n return dataType;\r\n }else if(dataType=='TIMESTAMP'){\r\n dataType = field.dataLen && field.dataLen>=0 && field.dataLen <=12 ? `${dataType}(${field.dataLen})`:`${dataType}`;\r\n return dataType;\r\n }else if(dataType=='DECIMAL'){\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 31 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen},${field.numScale})` : `${dataType}(${field.dataLen})`) : `${dataType}`;\r\n }else if(['SMALLINT','INTEGER','BIGINT','DOUBLE','DATE','TIME','BOOLEAN','REAL'].includes(dataType)){\r\n return dataType;\r\n }\r\n else{\r\n if(field.dataLen){\r\n return `${dataType}(${field.dataLen})`;\r\n }\r\n else{\r\n return dataType; \r\n }\r\n }\r\n\r\n}\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const defaultNotNull = field.notNull ? ' NOT NULL' : '';\r\n const defaultAutoIncrement = field.autoIncrement ? ' GENERATED ALWAYS AS IDENTITY' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n return `${dataType}${defaultNotNull}${defaultAutoIncrement}${defaultValue}${index < it.fields.length - 1 ? ',' : '' }`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n{{? pkList.length >0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY({{~indexFields:field:i}}{{= field.defKey }} {{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}COMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\r\n$blankline\r\n{{? updateKeys.some((item) => item === 'defKey') }}RENAME TABLE {{= tableKey }} TO {{= defKey }};{{?}}\r\n", + "tableDelete": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR') {\r\n return `${dbDataType} (${dataLen ? dataLen : '128'})`; \r\n } else if(dbDataType.toUpperCase() === 'SMALLINT' ||\r\n dbDataType.toUpperCase() === 'INTEGER' ||\r\n dbDataType.toUpperCase() === 'BIGINT' ||\r\n dbDataType.toUpperCase() === 'REAL' ||\r\n dbDataType.toUpperCase() === 'DOUBLE' ||\r\n dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'TIME' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'CHAR') {\r\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 255) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'NCHAR') {\r\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 63) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 12) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 31) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\r\n } else if(dataLen && dataLen >= 0) {\r\n return `${dbDataType} (${dataLen})`;\r\n }\r\n return dbDataType;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const finalDataType = computeDatatype(field);\r\n}}\r\nALTER TABLE {{= tableKey }} ADD {{= field.defKey}} {{= finalDataType}} {{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}};\r\n{{? field.defName || field.intro }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}", + "columnUpdate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n let updateIndexData = it.updateIndexData;\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR') {\r\n return `${dbDataType} (${dataLen ? dataLen : '128'})`; \r\n } else if(dbDataType.toUpperCase() === 'SMALLINT' ||\r\n dbDataType.toUpperCase() === 'INTEGER' ||\r\n dbDataType.toUpperCase() === 'BIGINT' ||\r\n dbDataType.toUpperCase() === 'REAL' ||\r\n dbDataType.toUpperCase() === 'DOUBLE' ||\r\n dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'TIME' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'CHAR') {\r\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 255) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'NCHAR') {\r\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 63) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 12) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 31) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\r\n } else if(dataLen && dataLen >= 0) {\r\n return `${dbDataType} (${dataLen})`;\r\n }\r\n return dbDataType;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~updateIndexData:row:index}}\r\n{{\r\n const fieldsUpdate = row.fieldsUpdate || [];\r\n const preDefKey = row?.baseUpdate?.pre?.defKey;\r\n}}\r\n{{? fieldsUpdate.length > 0 }}\r\nDROP INDEX {{= preDefKey ? preDefKey : row.defKey}};\r\n{{?}}\r\n{{~}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n const finalDataType = computeDatatype(field);\r\n const preDefKey = field?.baseUpdate?.pre?.defKey;\r\n const nextDefKey = field?.baseUpdate?.next?.defKey;\r\n}}\r\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey }} TO {{= field.defKey }};{{?}}\r\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale') }}\r\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey }} DROP DEFAULT;\r\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey }} SET DATA TYPE {{= finalDataType}};\r\n{{?}}\r\n{{? updateKeys.includes('defaultValue') }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey }} {{? field.defaultValue }} SET {{??}} DROP {{?}} DEFAULT {{? field.defaultValue}} {{= field.defaultValue}} {{?}};{{?}}\r\n{{? updateKeys.includes('notNull') }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey }} {{? field.notNull }} SET {{??}} DROP {{?}} NOT NULL;{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row?.fields?.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{? row.defName || row.intro }}\r\nCOMMENT ON INDEX {{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\r\n{{?}}\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX {{= preDefKey ? preDefKey : row.defKey}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX {{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT NAME AS DEF_KEY,\r\n REMARKS AS DEF_NAME,\r\n TRIM(CREATOR) AS SCHEMA_NAME\r\nFROM SYSIBM.SYSTABLES\r\nWHERE TRIM(CREATOR) IN (:schemaName) AND TYPE = 'T'\r\nORDER BY CTIME ASC", + "metaColumnQuery": "select\r\n TRIM(tbcreator) as SCHEMA_NAME,\r\n col.tbname as tbl_def_key,\r\n '' as intro,\r\n col.name as def_key,\r\n remarks as def_name,\r\n col.typename as db_data_type ,\r\n col.length as data_len,\r\n col.scale as num_scale,\r\n CASE WHEN col.keyseq IS NOT NULL THEN (\r\n CASE WHEN col.keyseq = 1 THEN 1 ELSE 0 END\r\n ) ELSE 0 END AS primary_key,\r\n CASE WHEN col.nulls = 'Y' THEN 0 ELSE 1 END AS not_null,\r\n col.default as default_value\r\nfrom sysibm.syscolumns col\r\nwhere TRIM(tbcreator) IN (:schemaName)\r\n and CONCAT(CONCAT(TRIM(tbcreator), '.'), TRIM(tbname)) IN (:sysTableNames)\r\norder by tbcreator,TBL_DEF_KEY, col.COLNO", + "metaIndexQuery": "SELECT\r\n TRIM(i.TABSCHEMA) AS SCHEMA_NAME,\r\n i.TABNAME AS TBL_DEF_KEY,\r\n c.COLNAME AS COL_DEF_KEY,\r\n i.INDNAME AS DEF_KEY,\r\n i.REMARKS AS DEF_NAME,\r\n '' AS INTRO,\r\n CASE\r\n WHEN COLORDER = 'A' THEN 'ASC'\r\n ELSE 'DESC'\r\n END AS SORT_TYPE,\r\n CASE\r\n WHEN i.UNIQUERULE = 'U' THEN 'UNIQUE'\r\n ELSE 'NORMAL'\r\n END AS TYPE,\r\n c.COLSEQ AS ORDER_VALUE\r\nFROM\r\n SYSCAT.INDEXES i\r\n LEFT JOIN SYSCAT.INDEXCOLUSE c\r\n ON i.INDSCHEMA = c.INDSCHEMA AND i.INDNAME = c.INDNAME\r\nWHERE i.TABSCHEMA IN (:schemaName) AND CONCAT(CONCAT(TRIM(i.TABSCHEMA), '.'), TRIM(i.TABNAME)) IN (:sysTableNames) AND i.UNIQUERULE != 'P'\r\nORDER BY i.TABSCHEMA, TBL_DEF_KEY, c.COLSEQ", + "metaQueryCharset": null, + "orderValue": 4, + "isEnabled": 0, + "id": "BPQHC4PNE64AC" + }, + { + "defKey": "SQLite", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "sqlite-jdbc-3.49.1.0.jar", + "jdbcReferDriver": "org.sqlite.JDBC", + "jdbcReferUrl": "jdbc:sqlite:{xxx.db}", + "tableCreate": "DROP TABLE IF EXISTS `{{=it.defKey}}`;\r\nCREATE TABLE `{{=it.defKey}}` (\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey && field.autoIncrement}}\r\n `{{=field.defKey}}` INTEGER PRIMARY KEY AUTOINCREMENT{{= index < it.fields.length-1 ? ',' : '' }}\r\n {{??}}`{{=field.defKey}}` {{=field.dbDataType}}{{?field.dataLen>0}}{{='('}}{{=field.dataLen}}{{?field.numScale>0}}{{=','}}{{=field.numScale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT',field.defaultValue,' ') : '' }}{{= index < it.fields.length-1 ? ',' : '' }} {{?}}\r\n{{~}}\r\n);\r\n$blankline\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n const tableKey = `${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\r\n\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue } = field;\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n return `DEFAULT ${defaultValue}`;\r\n };\r\n \r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n return `${dbDataType}`;\r\n };\r\n const tableKey = `${it.defKey}`;\r\n const fieldsUpdate = it.fieldsUpdate;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{= tableKey }} ADD COLUMN `{{=field.defKey}}` {{=computeDatatype(field)}} {{= field.notNull ? 'NOT NULL' : '' }} {{= computeDefaultValue(field)}};\r\n{{~}}", + "columnUpdate": "{{\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue } = field;\n if(!dbDataType) {\n return '';\n }\n return `${dbDataType}`;\n };\n let fieldsUpdate = it.fieldsUpdate;\n const tableKey = `${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\nALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey || field.defKey}} {{= nextDefKey || field.defKey}} {{= finalDataType}};\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n const tableKey = `${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE INDEX {{=row.defKey}} ON {{=it.defKey}} (\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{? preDefKey}} {{= preDefKey}}{{??}} {{=row.defKey}}{{?}};\n{{? row.fields.length && row.fields.length === 1 && row.defKey}}\nCREATE INDEX {{=row.defKey}} ON {{=it.defKey}} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT tbl_name AS def_key\r\nfrom sqlite_master\r\nWHERE type = 'table';", + "metaColumnQuery": "SELECT\r\n '' AS schema_name,\r\n tbl_name AS tbl_def_key,\r\n c.name AS def_key,\r\n CASE\r\n WHEN INSTR(c.type, '(') > 0 THEN SUBSTR(c.type, 1, INSTR(c.type, '(') - 1) ELSE c.type\r\n END AS db_data_type,\r\n c.`notnull` AS not_null,\r\n c.pk AS primary_key,\r\n c.dflt_value AS default_value,\r\n CASE\r\n WHEN INSTR(c.type, '(') > 0 THEN\r\n CASE \r\n WHEN INSTR(c.type, ',') > 0 THEN CAST(SUBSTR(c.type, INSTR(c.type, '(') + 1, INSTR(c.type, ',') - INSTR(c.type, '(') - 1) AS INTEGER)\r\n ELSE CAST(SUBSTR(c.type, INSTR(c.type, '(') + 1, INSTR(c.type, ')') - INSTR(c.type, '(') - 1) AS INTEGER) \r\n END ELSE NULL\r\n END AS data_len,\r\n CASE\r\n WHEN INSTR(c.type, ',') > 0 THEN CAST(SUBSTR(c.type, INSTR(c.type, ',') + 1, INSTR(c.type, ')') - INSTR(c.type, ',') - 1) AS INTEGER)\r\n ELSE NULL\r\n END AS num_scale\r\nFROM sqlite_master AS t,\r\n pragma_table_info(t.name) AS c\r\nWHERE t.type = 'table'\r\nORDER BY tbl_def_key ASC;", + "metaIndexQuery": "WITH input AS (\r\n SELECT\r\n seqno,\r\n '' AS SCHEMA_NAME,\r\n t.tbl_name AS TBL_DEF_KEY,\r\n t.name AS DEF_KEY,\r\n c.name AS COL_DEF_KEY,\r\n '\"' || c.name || '\"' AS targetName,\r\n SUBSTR(t.sql, instr(t.sql , '(')) AS targetSQL\r\n FROM sqlite_master AS t,\r\n pragma_index_info(t.name) AS c\r\n WHERE t.type = 'index'\r\n),\r\npositions AS (\r\n SELECT\r\n *,\r\n INSTR(targetSQL, targetName) AS start_pos\r\n FROM input\r\n),\r\ndelimiters AS (\r\n SELECT\r\n *,\r\n INSTR(SUBSTR(targetSQL, start_pos), ',') AS comma_pos,\r\n INSTR(SUBSTR(targetSQL, start_pos), ')') AS paren_pos\r\n FROM positions\r\n),\r\nlimits AS (\r\n SELECT\r\n *,\r\n CASE\r\n WHEN comma_pos > 0 AND (paren_pos = 0 OR comma_pos < paren_pos) THEN comma_pos\r\n WHEN paren_pos > 0 THEN paren_pos\r\n ELSE LENGTH(SUBSTR(targetSQL, start_pos)) + 1\r\n END AS end_relative_pos\r\n FROM delimiters\r\n)\r\nSELECT \r\n SCHEMA_NAME,\r\n TBL_DEF_KEY,\r\n DEF_KEY,\r\n COL_DEF_KEY,\r\n CASE\r\n WHEN instr(SUBSTR(targetSQL, start_pos, end_relative_pos - 1), 'DESC') > 0 THEN 'DESC'\r\n WHEN instr(SUBSTR(targetSQL, start_pos, end_relative_pos - 1), 'ASC') > 0 THEN 'ASC'\r\n ELSE NULL\r\n END AS SORT_TYPE\r\nFROM limits\r\nORDER BY tbl_def_key ASC, DEF_KEY ASC, seqno ASC;", + "metaQueryCharset": null, + "orderValue": 5, + "isEnabled": 0, + "id": "BPQHDDPPE64AB" + }, + { + "defKey": "GaussDB", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "opengauss-jdbc-5.1.0.jar", + "jdbcReferDriver": "org.postgresql.Driver", + "jdbcReferUrl": "jdbc:postgresql://[ip]:[port]/[database]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n function addField(field, pkList) {\r\n let fieldStr = `${field.defKey} ${field.dbDataType}`;\r\n if (field.autoIncrement) {\r\n fieldStr =`${field.defKey}${field.dbDataType?.toUpperCase() === 'BIGINT' ? ' BIGSERIAL' : ' SERIAL'}`;\r\n } else {\r\n if (['CHAR', 'CHARACTER', 'NCHAR', 'VARCHAR', 'VARCHAR2', 'NVARCHAR2', 'CHARACTER VARYING'].includes(field.dbDataType?.toUpperCase())) {\r\n if (field.dataLen && field.dataLen >= 1) {\r\n fieldStr += `(${field.dataLen})`;\r\n }\r\n } else if (field.dbDataType?.toUpperCase() === 'TIMESTAMP') {\r\n if (field.dataLen && field.dataLen >= 0 && field.dataLen <= 6) {\r\n fieldStr += `(${field.dataLen})`;\r\n }\r\n } else if (field.dbDataType?.toUpperCase() === 'NUMERIC' || field.dbDataType?.toUpperCase() === 'DECIMAL') {\r\n if (field.dataLen && field.dataLen >= 1 && field.dataLen <= 1000) {\r\n if (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen) {\r\n fieldStr += `(${field.dataLen},${field.numScale})`;\r\n } else {\r\n fieldStr += `(${field.dataLen})`;\r\n }\r\n }\r\n }\r\n }\r\n if (field.notNull) {\r\n fieldStr += ' NOT NULL';\r\n }\r\n if (!field.notNull) {\r\n fieldStr += ' NULL';\r\n }\r\n if (field.defaultValue) {\r\n fieldStr += ` DEFAULT ${field.defaultValue}`;\r\n }\r\n if (field.primaryKey) {\r\n pkList.push(field.defKey);\r\n }\r\n return `${fieldStr}${index < it.fields.length - 1 || pkList.length > 0 ? ',' : ''}`;\r\n }\r\n}}\r\n\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{= addField(field, pkList) }}{{~}}{{? pkList.length > 0 }}\r\n PRIMARY KEY ({{= pkList.join(', ')}}) {{?}}\r\n);\r\n$blankline{{~it.fields:field:index}}{{? field.defName || field.intro }}COMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'\r\n{{?}}\r\n{{~}}\r\n\r\n{{? it.defName || it.intro }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n{{?}}", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nDO $$\r\n DECLARE\r\n pk_constraint_name text;\r\n BEGIN\r\n SELECT constraint_name\r\n INTO pk_constraint_name\r\n FROM information_schema.table_constraints\r\n WHERE table_name = '{{=it.defKey}}' AND constraint_type = 'PRIMARY KEY' {{? it.schemaName }} AND constraint_schema = '{{= it.schemaName }}' {{?}}\r\n LIMIT 1;\r\n\r\n IF pk_constraint_name IS NOT NULL THEN\r\n EXECUTE 'ALTER TABLE {{= tableKey }} DROP CONSTRAINT ' || pk_constraint_name;\r\n ELSE\r\n RAISE NOTICE 'No primary key constraint found for the table.';\r\n END IF;\r\nEND $$;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}COMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\r\n$blankline\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}}; {{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};\n$blankline", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGSERIAL' : 'SERIAL';\n }\n if(dbDataType.toUpperCase() === 'INT2' ||\n dbDataType.toUpperCase() === 'INT4' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'SERIAL2' ||\n dbDataType.toUpperCase() === 'SERIAL4' ||\n dbDataType.toUpperCase() === 'SERIAL8' ||\n dbDataType.toUpperCase() === 'FLOAT4' ||\n dbDataType.toUpperCase() === 'FLOAT8' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'JSONB' ||\n dbDataType.toUpperCase() === 'JSON' ||\n dbDataType.toUpperCase() === 'DATE') {\n return dbDataType;\n }\n if(dbDataType.toUpperCase() === 'DECIMAL') {\n if(dataLen && dataLen >= 1 && dataLen <= 1000) {\n if(numScale && numScale >= 0 && numScale <= dataLen) {\n return `${dbDataType}(${dataLen},${numScale})`;\n } else {\n return `${dbDataType}(${dataLen})`;\n }\n }\n return dbDataType;\n }\n if(dataLen && dataLen >= 0) {\n return `${dbDataType}(${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey }} {{= finalDataType }} {{? field.notNull }} NOT NULL{{?}};\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{? field.defaultValue !== null && field.defaultValue !== undefined && field.defaultValue !== ''}}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey }} SET DEFAULT {{=field.defaultValue}};\n{{?}}\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGSERIAL' : 'SERIAL';\n }\n if(dbDataType.toUpperCase() === 'INT2' ||\n dbDataType.toUpperCase() === 'INT4' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'SERIAL2' ||\n dbDataType.toUpperCase() === 'SERIAL4' ||\n dbDataType.toUpperCase() === 'SERIAL8' ||\n dbDataType.toUpperCase() === 'FLOAT4' ||\n dbDataType.toUpperCase() === 'FLOAT8' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'JSONB' ||\n dbDataType.toUpperCase() === 'JSON' ||\n dbDataType.toUpperCase() === 'DATE') {\n return dbDataType;\n }\n if(dbDataType.toUpperCase() === 'DECIMAL') {\n if(dataLen && dataLen >= 1 && dataLen <= 1000) {\n if(numScale && numScale >= 0 && numScale <= dataLen) {\n return `${dbDataType}(${dataLen},${numScale})`;\n } else {\n return `${dbDataType}(${dataLen})`;\n }\n }\n return dbDataType;\n }\n if(dataLen && dataLen >= 0) {\n return `${dbDataType}(${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} TYPE {{=finalDataType}} USING \"{{= field.defKey}}\"::{{=finalDataType}};\n{{?}}\n{{? updateKeys.includes('notNull') }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.notNull }} SET {{??}} DROP {{?}} NOT NULL;{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nCOMMENT ON COLUMN {{= tableKey }}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{? updateKeys.includes('defaultValue') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.defaultValue }} SET DEFAULT {{=field.defaultValue}} {{??}} DROP DEFAULT {{?}};\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}ALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\r\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{= schemaName }}{{? preDefKey}}{{= preDefKey}}{{??}}{{=row.defKey}}{{?}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{?}}\n{{??}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}DROP INDEX IF EXISTS {{= schemaName }}{{=row.defKey}};{{~}}", + "metaTableQuery": "SELECT\r\n tb.TABLE_NAME as def_key,\r\n d.description as def_name,\r\n tb.table_schema as schema_name\r\nFROM\r\n information_schema.tables tb\r\n JOIN pg_class C ON C.relname = tb.TABLE_NAME\r\n JOIN pg_namespace n ON tb.table_schema = n.nspname AND c.relnamespace = n.oid\r\n LEFT JOIN pg_description d ON d.objoid = C.oid\r\n AND d.objsubid = '0'\r\nWHERE\r\n tb.table_schema IN (:schemaName)", + "metaColumnQuery": "SELECT\r\n col.table_schema as schema_name,\r\n col.TABLE_NAME AS tbl_def_key,\r\n col.ordinal_position AS order_value,\r\n col.COLUMN_NAME AS def_key,\r\n d.description AS def_name,\r\n\t\t'' AS intro,\r\n col.udt_name AS db_data_type,\r\n\t\tCASE WHEN col.character_maximum_length IS NULL AND col.numeric_precision IS NOT NULL THEN col.numeric_precision\r\n\t\t ELSE col.character_maximum_length\r\n\t\tEND AS data_len,\r\n\t\tCASE WHEN col.numeric_precision IS NOT NULL THEN (CASE WHEN col.numeric_scale = 0 THEN NULL ELSE col.numeric_scale END)\r\n\t\t\t\tELSE NULL\r\n\t\tEND AS num_scale,\r\n CASE WHEN kc.column_name IS NOT NULL THEN 1 ELSE 0 END AS primary_key,\r\n CASE WHEN col.IS_NULLABLE = 'NO' THEN 1 ELSE 0 END AS not_null,\r\n CASE WHEN col.COLUMN_DEFAULT LIKE 'nextval%' THEN 1 ELSE 0 END AS auto_increment,\r\n CASE\r\n WHEN strpos(col.column_default, concat('::',col.data_type)) = 0 THEN (CASE\r\n WHEN col.column_default LIKE 'nextval%' THEN ''\r\n ELSE col.column_default\r\n END)\r\n ELSE substr(col.column_default,0,strpos(col.column_default, concat('::',col.data_type))-1)\r\n END AS default_value\r\n\t ---\tsubstr(col.column_default,0,strpos(col.column_default, concat('::',col.data_type))) AS default_value\r\nFROM\r\n information_schema.COLUMNS col LEFT JOIN (information_schema.key_column_usage kc LEFT JOIN information_schema.table_constraints tc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tON\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkc.constraint_name = tc.constraint_name\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand tc.constraint_type = 'PRIMARY KEY'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand kc.table_schema=tc.table_schema\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand kc.table_name=tc.table_schema\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) ON\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcol.TABLE_NAME = kc.table_name\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND col.COLUMN_NAME = kc.column_name AND kc.table_schema = col.table_schema\r\nLEFT JOIN pg_class C ON C.relname = col.TABLE_NAME\r\nLEFT JOIN pg_namespace n ON col.table_schema = n.nspname AND c.relnamespace = n.oid\r\nLEFT JOIN pg_description d ON d.objoid = C.oid AND d.objsubid = col.ordinal_position\r\nWHERE\r\n col.table_schema IN (:schemaName)\r\n AND nspName IN (:schemaName)\r\n AND CONCAT(col.table_schema, '.', col.TABLE_NAME) IN (:sysTableNames)\r\nORDER BY\r\n\tcol.table_schema asc, col.TABLE_NAME asc,col.ordinal_position ASC\r\n", + "metaIndexQuery": "SELECT\r\n n.nspname AS schema_name,\r\n c1.relname AS tbl_def_key,\r\n a.attname AS col_def_key,\r\n c2.relname AS def_key,\r\n s.conname AS intro,\r\n d.description AS def_name,\r\n x.indoption ,\r\n CASE\r\n WHEN array_length(x.indoption, 1) > 2 THEN (CASE WHEN x.indoption[1] & 2 <> 0 THEN 'DESC' ELSE 'ASC' END )\r\n ELSE (CASE\r\n WHEN x.indoption[0] > 0 THEN 'DESC'\r\n ELSE 'ASC'\r\n END\r\n )\r\n END AS sort_type,\r\n --CASE WHEN x.indoption[1] & 2 <> 0 THEN 'DESC' ELSE 'ASC' END AS sort_type,\r\n CASE WHEN x.indisunique THEN 'UNIQUE' ELSE 'NORMAL' END AS type\r\n\r\nFROM pg_index x\r\n lEFT JOIN pg_class c1 ON c1.oid = x.indrelid\r\n lEFT JOIN pg_class c2 ON c2.oid = x.indexrelid\r\n lEFT JOIN pg_namespace n ON n.oid = c1.relnamespace\r\n LEFT JOIN pg_description d ON c2.oid = d.objoid\r\n lEFT JOIN pg_attribute a ON a.attrelid = c1.oid AND a.attnum = ANY(x.indkey)\r\n LEFT JOIN pg_constraint s ON s.conrelid = x.indrelid AND s.conindid = x.indexrelid\r\nWHERE n.nspname in (:schemaName) AND indisprimary = 0\r\nAND CONCAT(n.nspname, '.', c1.relname) IN (:sysTableNames)\r\nORDER BY n.nspname,tbl_def_key, def_key", + "metaQueryCharset": null, + "orderValue": 6, + "isEnabled": 0, + "id": "BPMCJTYLY5UAC" + }, + { + "defKey": "DaMeng", + "defName": null, + "icon": "\n \n \n \n\n\n\n\n\n\n\n\n\n \n ", + "driverFiles": "DmJdbcDriver18-8.1.2.79.jar", + "jdbcReferDriver": "dm.jdbc.driver.DmDriver", + "jdbcReferUrl": "jdbc:dm://[ip]:[port]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n let dataType = dbDataType.toUpperCase();\r\n if(['SMALLINT', 'INTEGER', 'BIGINT', 'REAL', 'DATE', 'TINYINT', 'INT', 'INTERVAL'].includes(dataType)\r\n ){\r\n return dataType;\r\n }else if(dataType=='DOUBLE'){\r\n dataType = field.dataLen && field.dataLen>=0 && field.dataLen <=126 ? `${dataType}(${field.dataLen})`:`${dataType}`;\r\n return dataType;\r\n }else if(dataType=='TIME'){\r\n dataType = field.dataLen && field.dataLen>=0 && field.dataLen <=6 ? `${dataType}(${field.dataLen})`:`${dataType}`;\r\n return dataType;\r\n }else if(dataType=='DATETIME'){\r\n dataType = field.dataLen && field.dataLen>=0 && field.dataLen <=10 ? `${dataType}(${field.dataLen})`:`${dataType}`;\r\n return dataType;\r\n }else if(dataType=='TIMESTAMP'){\r\n dataType = field.dataLen && field.dataLen>=0 && field.dataLen <=9 ? `${dataType}(${field.dataLen})`:`${dataType}`;\r\n return dataType;\r\n }else if(dataType=='DECIMAL'){\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 38 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen},${field.numScale})` : `${dataType}(${field.dataLen})`) : `${dataType}`;\r\n }else{\r\n if(field.dataLen){\r\n return `${dataType}(${field.dataLen})`;\r\n }else{\r\n return dataType; \r\n }\r\n }\r\n\r\n}\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const defaultNotNull = field.notNull ? ' NOT NULL' : '';\r\n const defaultAutoIncrement = field.autoIncrement ? ' IDENTITY(1,1)' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n return `${dataType}${defaultNotNull}${defaultAutoIncrement}${defaultValue}${index < it.fields.length-1 || pkList.length>0 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n{{? pkList.length >0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY({{~indexFields:field:i}}{{= field.defKey }} {{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=defName}}{{? defName && intro}}; {{=intro}}{{?? intro}}{{=intro}}{{?}}'; \r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'TINYINT' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase().startsWith('INTERVAL')) {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 126) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIME') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DATETIME') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 10) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 9) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD {{= field.defKey}} {{= finalDataType}} {{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}};\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=field.defName}}{{? field.defName && field.intro}}; {{=field.intro}}{{?? field.intro}}{{=field.intro}}{{?}}';\n{{?}}\n{{~}}", + "columnUpdate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'SMALLINT' ||\r\n dbDataType.toUpperCase() === 'INTEGER' ||\r\n dbDataType.toUpperCase() === 'BIGINT' ||\r\n dbDataType.toUpperCase() === 'REAL' ||\r\n dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'TINYINT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase().startsWith('INTERVAL')) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 126) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'TIME') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DATETIME') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 10) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 9) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType} ${(dataLen && dataLen > 0 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\r\n } else if(dataLen && dataLen >= 0) {\r\n return `${dbDataType} (${dataLen})`;\r\n }\r\n return dbDataType;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n const finalDataType = computeDatatype(field);\r\n const preDefKey = field?.baseUpdate?.pre?.defKey;\r\n const nextDefKey = field?.baseUpdate?.next?.defKey;\r\n}}\r\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey }} TO {{= field.defKey }};{{?}}\r\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'intro' || item === 'defName') }}\r\nALTER TABLE {{= tableKey }} MODIFY {{= field.defKey}} {{= finalDataType}}{{? updateKeys.includes('notNull') }} {{? field.notNull }} NOT NULL {{??}} NULL {{?}}{{?}}{{? updateKeys.includes('defaultValue') }}{{? field.defaultValue }} DEFAULT {{= field.defaultValue}}{{?}}{{?}};\r\n{{?}}\r\n{{~}}\r\n", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{= schemaName }}{{? preDefKey}}{{= preDefKey}}{{??}}{{=row.defKey}}{{?}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{= schemaName }}{{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT\r\n t.table_name AS def_key,\r\n c.comments AS def_name,\r\n t.OWNER AS schema_name\r\nFROM all_tables t left join all_tab_comments c on t.OWNER=c.OWNER and t.TABLE_NAME=c.TABLE_NAME\r\nwhere t.OWNER IN (:schemaName) AND t.table_name not like '##%';", + "metaColumnQuery": "SELECT\r\n col.OWNER AS SCHEMA_NAME,\r\n col.table_name AS tbl_def_key,\r\n '' AS intro,\r\n col.column_name AS def_key,\r\n clc.comments AS def_name,\r\n col.data_type AS db_data_type,\r\n col.data_scale AS num_scale,\r\n col.data_length AS data_len,\r\n CASE WHEN col.nullable = 'N' THEN 1 ELSE 0 END AS not_null,\r\n CASE WHEN cpk.constraint_type IS NOT NULL THEN 1 ELSE 0 END AS primary_key,\r\n CASE WHEN ai.TABLE_NAME IS NOT NULL THEN 1 ELSE 0 END AS \"auto_increment\",\r\n col.data_default AS default_value\r\nFROM\r\n all_tab_columns col\r\n LEFT JOIN all_col_comments clc ON col.owner = clc.SCHEMA_NAME AND col.table_name = clc.table_name AND col.column_name = clc.column_name\r\n LEFT JOIN (select cst.owner,cst.constraint_name,csc.table_name,csc.column_name,cst.constraint_type\r\n from all_constraints cst,all_cons_columns csc\r\n where 1=1\r\n and cst.owner = csc.owner\r\n and cst.constraint_name=csc.constraint_name\r\n and cst.constraint_type ='P'\r\n and csc.table_name not like '%$%'\r\n ) cpk on col.owner = cpk.owner and col.table_name = cpk.table_name AND col.column_name = cpk.column_name\r\n LEFT JOIN (\r\n SELECT DISTINCT B.OWNER, B.TABLE_NAME, A.name\r\n FROM SYS.SYSCOLUMNS A,ALL_TABLES B,SYS.SYSOBJECTS C\r\n WHERE A.INFO2 & 0X01 = 0X01\r\n AND A.ID=C.ID\r\n AND C.NAME= B.TABLE_NAME\r\n ) ai ON ai.OWNER = col.OWNER AND UPPER(CONCAT(TRIM(ai.OWNER), '.', TRIM(ai.TABLE_NAME))) = UPPER(CONCAT(TRIM(col.OWNER), '.', TRIM(col.table_name))) AND col.column_name = ai.name\r\nWHERE\r\n col.OWNER IN (:schemaName)\r\n AND UPPER(CONCAT(TRIM(col.OWNER), '.', TRIM(col.table_name))) IN (:sysTableNames)\r\nORDER BY col.OWNER ASC, col.table_name ASC, COLUMN_ID ASC", + "metaIndexQuery": "select \n ai.table_owner as schema_name,\n ai.table_name as tbl_def_key,\n dic.column_name as col_def_key,\n dic.descend as sort_type,\n ai.index_name as def_key,\n dic.column_position as order_value,\n '' as intro,\n '' as def_name,\n case when ai.uniqueness = 'UNIQUE' then 'UNIQUE' else 'NORMAL' end as type\nfrom all_indexes ai join dba_ind_columns dic\n on (ai.table_name = dic.table_name and ai.INDEX_NAME = dic.INDEX_NAME)\nwhere ai.table_type = 'TABLE' and ai.table_owner in (:schemaName)\n and CONCAT(ai.table_owner, '.', ai.table_name) in (:sysTableNames)\n and ai.index_name NOT IN (\n SELECT\n INDEX_NAME\n FROM\n USER_CONSTRAINTS uc\n JOIN\n USER_CONS_COLUMNS ucc ON uc.CONSTRAINT_NAME = ucc.CONSTRAINT_NAME\n WHERE\n CONCAT(uc.OWNER, '.', uc.TABLE_NAME) in (:sysTableNames)\n AND uc.OWNER IN (:schemaName)\n AND uc.CONSTRAINT_TYPE = 'P'\n )\norder by ai.table_owner, tbl_def_key, def_key;", + "metaQueryCharset": null, + "orderValue": 7, + "isEnabled": 0, + "id": "BPQHDLFQY64AC" + }, + { + "defKey": "KingBase", + "defName": null, + "icon": "\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n ", + "driverFiles": "kingbase8-8.6.0.jar", + "jdbcReferDriver": "com.kingbase8.Driver", + "jdbcReferUrl": "jdbc:kingbase8://[ip]:[port]/[database]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n function addField(field, pkList) {\r\n let fieldStr = `${field.defKey} ${field.dbDataType}`;\r\n if (field.autoIncrement) {\r\n fieldStr =`${field.defKey}${field.dbDataType?.toUpperCase() === 'BIGINT' ? ' BIGSERIAL' : ' SERIAL'}`;\r\n } else {\r\n if (['TINYINT', 'SMALLINT', 'INT', 'INTEGER', 'BIGINT', 'SMALLSERIAL', 'BIGSERIAL', \r\n 'REAL', 'DOUBLE PRECISION', 'DATE', 'DATETIME', 'TEXT', 'BYTEA', 'BOOL', \r\n 'JSONB', 'SERIAL', 'JSON'].includes(field.dbDataType?.toUpperCase())) {\r\n if (field.dataLen && field.dataLen >= 1) {\r\n fieldStr += ``;\r\n }\r\n } \r\n else if (field.dbDataType?.toUpperCase() === 'TIMESTAMP') {\r\n if (field.dataLen && field.dataLen >= 0 && field.dataLen <= 6) {\r\n fieldStr += `(${field.dataLen})`;\r\n }\r\n } else if (field.dbDataType?.toUpperCase() === 'NUMERIC' || field.dbDataType?.toUpperCase() === 'DECIMAL') {\r\n if (field.dataLen && field.dataLen >= 1 && field.dataLen <= 1000) {\r\n if (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen) {\r\n fieldStr += `(${field.dataLen},${field.numScale})`;\r\n } else {\r\n fieldStr += `(${field.dataLen})`;\r\n }\r\n }\r\n }\r\n else{\r\n fieldStr += `(${field.dataLen})`;\r\n }\r\n }\r\n if (field.notNull) {\r\n fieldStr += ' NOT NULL';\r\n }\r\n if (field.defaultValue) {\r\n fieldStr += ` DEFAULT ${field.defaultValue}`;\r\n }\r\n if (field.primaryKey) {\r\n pkList.push(field.defKey);\r\n }\r\n return `${fieldStr}${index < it.fields.length - 1 || pkList.length > 0 ? ',' : ''}`;\r\n }\r\n}}\r\n\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{= addField(field, pkList) }}{{~}}{{? pkList.length > 0 }}\r\n PRIMARY KEY ({{= pkList.join(', ')}}) {{?}}\r\n);\r\n$blankline{{~it.fields:field:index}}{{? field.defName || field.intro }}COMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n\r\n{{? it.defName || it.intro }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n{{?}}", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP CONSTRAINT IF EXISTS \"{{=it.defKey}}_pkey\";\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}COMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGSERIAL' : 'SERIAL';\n } else if(dbDataType.toUpperCase() === 'TINYINT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'SMALLSERIAL' ||\n dbDataType.toUpperCase() === 'BIGSERIAL' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'DOUBLE PRECISION' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'BOOL' ||\n dbDataType.toUpperCase() === 'JSONB' ||\n dbDataType.toUpperCase() === 'SERIAL' ||\n dbDataType.toUpperCase() === 'JSON') {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'TIME' ||\n dbDataType.toUpperCase() === 'TIMESTAMP' ) {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'NUMERIC' || \n dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 1000) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD {{= field.defKey}} {{= finalDataType}} {{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}};\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGSERIAL' : 'SERIAL';\n } else if(dbDataType.toUpperCase() === 'TINYINT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'SMALLSERIAL' ||\n dbDataType.toUpperCase() === 'BIGSERIAL' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'DOUBLE PRECISION' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'BOOL' ||\n dbDataType.toUpperCase() === 'JSONB' ||\n dbDataType.toUpperCase() === 'SERIAL' ||\n dbDataType.toUpperCase() === 'JSON') {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'TIME' ||\n dbDataType.toUpperCase() === 'TIMESTAMP' ) {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'NUMERIC' || \n dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 1000) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} SET DATA TYPE {{=finalDataType}};\n{{?}}\n{{? updateKeys.includes('notNull') }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.notNull }} SET {{??}} DROP {{?}} NOT NULL;{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{? updateKeys.includes('defaultValue') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.defaultValue }} SET DEFAULT {{=field.defaultValue}} {{??}} DROP DEFAULT {{?}};\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\r\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{= schemaName }}{{? preDefKey}}{{= preDefKey}}{{??}}{{=row.defKey}}{{?}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{= schemaName }}{{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT\r\n tb.TABLE_NAME as def_key,\r\n d.description as def_name,\r\n tb.table_schema as schema_name\r\nFROM\r\n information_schema.tables tb\r\n JOIN pg_class C ON C.relname = tb.TABLE_NAME\r\n JOIN pg_namespace n ON tb.table_schema = n.nspname AND c.relnamespace = n.oid\r\n LEFT JOIN pg_description d ON d.objoid = C.oid\r\n AND d.objsubid = '0'\r\nwhere tb.table_type = 'BASE TABLE' AND tb.table_schema IN (:schemaName);", + "metaColumnQuery": "SELECT\r\n col.table_schema AS schema_name,\r\n col.TABLE_NAME AS tbl_def_key,\r\n col.ordinal_position AS order_value,\r\n col.COLUMN_NAME AS def_key,\r\n d.description AS def_name,\r\n\t\t'' AS intro,\r\n col.udt_name AS db_data_type,\r\n\t\tCASE WHEN col.character_maximum_length IS NULL AND col.numeric_precision IS NOT NULL THEN col.numeric_precision\r\n\t\t ELSE col.character_maximum_length\r\n\t\tEND AS data_len,\r\n\t\tCASE WHEN col.numeric_precision IS NOT NULL THEN (CASE WHEN col.numeric_scale = 0 THEN NULL ELSE col.numeric_scale END)\r\n\t\t\t\tELSE NULL \r\n\t\tEND AS num_scale,\r\n CASE WHEN kc.column_name IS NOT NULL THEN 1 ELSE 0 END AS primary_key,\r\n CASE WHEN col.IS_NULLABLE = 'NO' THEN 1 ELSE 0 END AS not_null,\r\n CASE WHEN col.COLUMN_DEFAULT LIKE 'nextval%' THEN 1 ELSE 0 END AS auto_increment,\r\n\t--\tsubstr(col.column_default,0,strpos(col.column_default, concat('::',col.data_type))) AS default_value\r\n\tCASE\r\n WHEN strpos(col.column_default, concat('::',col.data_type)) = 0 THEN (CASE\r\n WHEN col.column_default LIKE 'nextval%' THEN ''\r\n ELSE col.column_default\r\n END)\r\n ELSE substr(col.column_default,0,strpos(col.column_default, concat('::',col.data_type))-1)\r\n END AS default_value\r\nFROM\r\n information_schema.COLUMNS col LEFT JOIN (information_schema.key_column_usage kc JOIN information_schema.table_constraints tc \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tON \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkc.constraint_name = tc.constraint_name \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand tc.constraint_type = 'PRIMARY KEY'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand kc.table_schema=tc.table_schema \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand kc.table_name=tc.table_name --25.1.11 tc.table_schema\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) ON \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcol.TABLE_NAME = kc.table_name \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND col.COLUMN_NAME = kc.column_name\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND col.table_schema=kc.table_schema --25.1.11\r\nLEFT JOIN pg_class C ON C.relname = col.TABLE_NAME\r\nJOIN pg_namespace n ON col.table_schema = n.nspname AND c.relnamespace = n.oid\r\nLEFT JOIN pg_description d ON d.objoid = C.oid AND d.objsubid = col.ordinal_position\r\nWHERE\r\n col.table_schema IN (:schemaName)\r\n AND CONCAT(TRIM(col.table_schema), CONCAT('.', TRIM(col.TABLE_NAME))) IN (:sysTableNames)\r\n AND col.table_schema IN (:schemaName)\r\nORDER BY\r\n\tcol.table_schema, col.TABLE_NAME asc,col.ordinal_position ASC\r\n", + "metaIndexQuery": "SELECT ns.nspname AS schema_name, \r\n t.relname AS tbl_def_key,\r\n a.attname AS col_def_key,\r\n d.description AS def_name,\r\n d.description AS intro,\r\n --CASE\r\n -- WHEN ix.indoption[array_position(ix.indkey, a.attnum) - 1] & 1 = 0 THEN 'ASC'\r\n -- ELSE 'DESC'\r\n --END AS sort_type,\r\n CASE\r\n WHEN array_length(ix.indoption, 1) > 2 THEN (CASE WHEN ix.indoption[1] & 2 <> 0 THEN 'DESC' ELSE 'ASC' END )\r\n ELSE (CASE\r\n WHEN ix.indoption[0] > 0 THEN 'DESC'\r\n ELSE 'ASC'\r\n END\r\n )\r\n END AS sort_type,\r\n CASE\r\n WHEN ix.indisunique THEN 'UNIQUE'\r\n ELSE 'NORMAL'\r\n END AS type,\r\n array_position(ix.indkey, a.attnum) AS order_value,\r\n idx.relname AS def_key\r\nFROM pg_class t\r\n JOIN\r\n pg_namespace ns ON ns.oid = t.relnamespace\r\n JOIN\r\n pg_index ix ON t.oid = ix.indrelid\r\n JOIN\r\n pg_class idx ON ix.indexrelid = idx.oid\r\n JOIN\r\n unnest(ix.indkey) WITH ORDINALITY AS key_col(attnum, ord) ON true\r\n JOIN\r\n pg_attribute a ON t.oid = a.attrelid AND a.attnum = key_col.attnum\r\n LEFT JOIN\r\n pg_description d ON idx.oid = d.objoid\r\nWHERE ns.nspname IN (:schemaName)\r\n AND CONCAT(ns.nspname, CONCAT('.', t.relname)) IN (:sysTableNames)\r\n AND indisprimary = false\r\nORDER BY ns.nspname, \r\n tbl_def_key,\r\n def_key", + "metaQueryCharset": null, + "orderValue": 8, + "isEnabled": 0, + "id": "BPQHDZHMI64AB" + }, + { + "defKey": "ShenTong", + "defName": null, + "icon": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n", + "driverFiles": "oscarJDBC.jar", + "jdbcReferDriver": "com.oscar.Driver", + "jdbcReferUrl": "jdbc:oscar://{host}[:{port}]/[{database}]", + "tableCreate": "{{\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType}${(dataLen && dataLen >= 1 && dataLen < 54) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP' ||\n dbDataType.toUpperCase() === 'TIME') {\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`; \n } else if(dbDataType.toUpperCase() === 'CHAR' ||\n dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'BINARY' ||\n dbDataType.toUpperCase() === 'VARBINARY') {\n return `${dbDataType}${(dataLen && dataLen > 0) ? `(${dataLen})` : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}DROP TABLE IF EXISTS {{= tableKey }};\nCREATE TABLE {{=tableKey }} (\n{{ pkList = [] ; }}\n{{~it.fields:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n let lineEnd=',';\n if(index==it.fields.length-1&&pkList.length==0){\n lineEnd = '';\n }\n}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{= finalDataType}}{{= field.notNull ? ' NOT NULL' : '' }}{{? field.defaultValue }} DEFAULT {{= field.defaultValue }}{{?}}{{=lineEnd}}\n{{~}}\n{{? pkList.length > 0 }} PRIMARY KEY ({{= pkList.join(', ')}}) {{?}}\n);\n\n{{~it.fields:field:index}}\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{~}}\n\n{{? it.defName || it.intro }}\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\n{{?}}", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY({{~indexFields:field:i}}{{= field.defKey }} {{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen < 54) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP' ||\n dbDataType.toUpperCase() === 'TIME') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`; \n } else if(dbDataType.toUpperCase() === 'CHAR' ||\n dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'BINARY' ||\n dbDataType.toUpperCase() === 'VARBINARY') {\n return `${dbDataType} ${(dataLen && dataLen > 0) ? `(${dataLen})` : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey}} {{= finalDataType}} {{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}};\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen < 54) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP' ||\n dbDataType.toUpperCase() === 'TIME') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`; \n } else if(dbDataType.toUpperCase() === 'CHAR' ||\n dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'BINARY' ||\n dbDataType.toUpperCase() === 'VARBINARY') {\n return `${dbDataType} ${(dataLen && dataLen > 0) ? `(${dataLen})` : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} MODIFY {{= field.defKey}} {{=finalDataType}};\n{{?}}\n{{? updateKeys.includes('notNull') }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.notNull }} SET {{??}} DROP {{?}} NOT NULL;{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{? updateKeys.includes('defaultValue') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.defaultValue }} SET DEFAULT {{=field.defaultValue}} {{??}} DROP DEFAULT {{?}};\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{= schemaName }}{{=row.defKey}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{= schemaName }}{{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT\r\n NULL AS id,\r\n c.relname AS def_key,\r\n d.description AS def_name,\r\n n.nspname AS schema_name\r\nFROM\r\n sys_class c\r\nLEFT JOIN\r\n sys_description d ON c.OID = d.objoid AND d.objsubid = 0\r\nJOIN\r\n sys_namespace n ON c.RELNAMESPACE = n.OID\r\nWHERE\r\n c.RELKIND = 'r' AND -- 'r' 表示普通表\r\n n.nspname IN (:schemaName)-- 当前模式名\r\n\t", + "metaColumnQuery": "SELECT\r\n A.TABLE_SCHEM AS schema_name,\r\n A.TABLE_NAME AS tbl_def_key,\r\n A.ordinal_position AS order_value,\r\n A.COLUMN_NAME as def_key,\r\n A.REMARKS AS def_name,\r\n '' AS intro,\r\n A.TYPE_NAME as db_data_type,\r\n A.COLUMN_SIZE as data_len,\r\n A.DECIMAL_DIGITS as num_scale,\r\n DECODE(CASE WHEN B.COLUMN_NAME IS NOT NULL THEN 1 ELSE 0 END, 1, 1, 0) as primary_key, --1:是 0:否\r\n CAST((CASE WHEN A.NULLABLE=0 THEN 1 ELSE 0 END) as VARCHAR(500)) as not_null, --1:是 0:否\r\n DECODE(CASE WHEN D.ATTISAUTO IS True THEN 1 ELSE 0 END, 1, 1, 0) as auto_increment,\r\n A.COLUMN_DEF as default_value\r\nFROM\r\n v_sys_columns A\r\nLEFT \r\nJOIN v_sys_primary_keys B ON A.TABLE_NAME = B.TABLE_NAME\r\nAND A.column_name=b.column_name\r\nJOIN SYS_CLASS C ON A.TABLE_NAME =C.RELNAME \r\nJOIN sys_attribute D ON A.COLUMN_NAME=D.ATTNAME\r\n AND C.OID=D.ATTRELID\r\nAND A.COLUMN_NAME=D.ATTNAME\r\nWHERE\r\n A.TABLE_SCHEM IN (:schemaName)\r\n AND CONCAT(A.TABLE_SCHEM, '.', A.TABLE_NAME) IN (:sysTableNames)\r\n AND A.ORDINAL_POSITION >= 0\r\nORDER BY\r\n A.TABLE_SCHEM asc, A.TABLE_NAME asc,A.ordinal_position ASC;", + "metaIndexQuery": "SELECT \r\n A.SCHEMANAME AS SCHEMA_NAME,\r\n A.TABLENAME AS TBL_DEF_KEY, \r\n C.COLUMN_NAME AS COL_DEF_KEY, \r\n '' AS DEF_NAME,\r\n '' AS INTRO, \r\n (CASE WHEN ASC_OR_DESC='A' THEN 'ASC' ELSE 'DESC' END) AS SORT_TYPE,\r\n (CASE WHEN ISUNIQUE='true' THEN 'UNIQUE' ELSE 'NORMAL' END) AS TYPE,\r\n B.ORDINAL_POSITION AS ORDER_VALUE, \r\n A.INDEXNAME AS DEF_KEY\r\nFROM v_sys_indexes A \r\n JOIN v_sys_index_statistics B ON A.INDEXNAME=B.INDEX_NAME\r\n JOIN v_sys_columns C ON A.INDEXNAME=C.TABLE_NAME\r\n AND C.COLUMN_NAME=B.COLUMN_NAME\r\nWHERE \r\n A.SCHEMANAME IN (:schemaName) -- 替换为目标模式\r\n AND CONCAT(A.SCHEMANAME, '.', A.TABLENAME) IN (:sysTableNames) -- 替换为目标表名\r\n AND A.INDEXSCHEMANAME IN (:schemaName) -- 替换为目标模式\r\n AND ISPRIMARY = 0\r\nORDER BY \r\n A.SCHEMANAME, A.TABLENAME, A.INDEXNAME", + "metaQueryCharset": null, + "orderValue": 9, + "isEnabled": 0, + "id": "1LNU2743D0402" + }, + { + "defKey": "GBase 8A", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "gbase-connector-java-9.5.0.1-build1-bin.jar", + "jdbcReferDriver": "com.gbase.jdbc.Driver", + "jdbcReferUrl": "jdbc:gbase://[ip]:[port]/[database]?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n const dataType = dbDataType.toUpperCase();\r\n if (['VARCHAR'].includes(dataType)) {\r\n return `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n } else if (['BOOLEAN','DATE','LONGBLOB','TIME'].includes(dataType)) {\r\n return dataType;\r\n } else if (dataType === 'FLOAT') {\r\n return field.dataLen && field.dataLen >= 1 && field.dataLen <= 53 ? `${dataType}(${field.dataLen})` : dataType;\r\n } else if (dataType === 'DOUBLE') {\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 30 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen},${field.numScale})` : `${dataType}(${field.dataLen},30)`) : `${dataType}(30,30)`;\r\n } else if (dataType === 'DECIMAL') {\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 255 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen},${field.numScale})` : `${dataType}(${field.dataLen})`) : `${dataType}`;\r\n } else {\r\n return field.dataLen && field.dataLen >= 0 ? `${dataType}(${field.dataLen})` : dataType;\r\n }\r\n }\r\n\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const notNull = field.notNull ? ' NOT NULL' : ' NULL';\r\n const autoIncrement = field.autoIncrement ? ' AUTO_INCREMENT' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n const comment = ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n return `\"${field.defKey}\" ${dataType}${notNull}${autoIncrement}${defaultValue}${comment}${index < fields.length - 1 || pkList.length > 0 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n{{? pkList.length > 0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i < pkList.length - 1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n) COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n$blankline\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD CONSTRAINT PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nALTER TABLE {{= tableKey }} COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}RENAME TABLE {{= tableKey }} TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'VARCHAR') {\n return `${dbDataType} (${dataLen ? dataLen : 128})`\n } else if(dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'LONGBLOB' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'TIME') {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 53) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 30) ? ((numScale && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen, 30})`) : ((numScale && numScale >= 0 && numScale <= 30) ? `(${dataLen},${numScale})` : `(30, 30)`)}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey}} {{= finalDataType}}{{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'VARCHAR') {\n return `${dbDataType} (${dataLen ? dataLen : 128})`\n } else if(dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'LONGBLOB' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'TIME') {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 53) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 30) ? ((numScale && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen, 30})`) : ((numScale && numScale >= 0 && numScale <= 30) ? `(${dataLen},${numScale})` : `(30, 30)`)}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'intro' || item === 'defName' || item === 'defKey') }}\nALTER TABLE {{= tableKey }} {{? updateKeys.includes('defKey') }} CHANGE COLUMN {{= preDefKey}} {{= nextDefKey}} {{??}} MODIFY COLUMN {{= field.defKey}} {{?}} {{= finalDataType}} {{? updateKeys.includes('defName') || updateKeys.includes('intro') }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}' {{?}};\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}ALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields && row.fields.length === 1 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX {{? preDefKey}} {{= preDefKey}}{{??}} {{=row.defKey}} {{?}} ON {{= tableKey }};;\n{{? row.fields && row.fields.length === 1 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX {{=row.defKey}} ON {{= tableKey }};\n{{~}}", + "metaTableQuery": "SELECT \r\n table_schema AS schemaName,\r\n table_name AS def_key, \r\n table_comment AS def_name\r\nFROM information_schema.tables\r\n WHERE table_schema in (:schemaName)\r\n ", + "metaColumnQuery": "SELECT\r\n TRIM(table_schema) AS schema_name,\r\n table_name AS tbl_def_key,\r\n ordinal_position as order_value,\r\n column_name AS def_key,\r\n column_comment AS def_name,\r\n '' AS intro,\r\n data_type AS db_data_type,\r\n column_type,\r\n IF(data_type LIKE column_type,NULL,COALESCE ( character_maximum_length, numeric_precision )) AS data_len,\r\n IF(data_type LIKE column_type, NULL, numeric_scale ) AS num_scale,\r\n IF(column_key = 'PRI', 1, 0 ) AS primary_key,\r\n IF(is_nullable = 'YES', 0, 1 ) AS not_null,\r\n IF(extra = 'AUTO_INCREMENT', 1, 0 ) AS auto_increment,\r\n column_default AS default_value\r\nFROM\r\n information_schema.COLUMNS\r\nWHERE\r\n table_schema IN (:schemaName)\r\n and CONCAT(table_schema, '.', table_name) in (:sysTableNames)\r\nORDER BY\r\n table_schema ASC,\r\n table_name ASC,\r\n ordinal_position ASC;", + "metaIndexQuery": "SELECT \r\n TRIM(INDEX_SCHEMA) AS SCHEMA_NAME, \r\n TABLE_NAME AS TBL_DEF_KEY,\r\n COLUMN_NAME AS COL_DEF_KEY,\r\n COMMENT AS DEF_NAME,\r\n '' AS INTRO,\r\n IF (COLLATION = 'A', 'ASC', 'DESC') AS SORT_TYPE,\r\n IF (NON_UNIQUE = 1, 'NORMAL', 'UNIQUE') AS TYPE,\r\n SEQ_IN_INDEX AS ORDER_VALUE,\r\n INDEX_NAME AS DEF_KEY FROM information_schema.STATISTICS\r\n WHERE TRIM(INDEX_SCHEMA) IN (:schemaName) AND CONCAT(TRIM(INDEX_SCHEMA), '.', TRIM(TABLE_NAME)) IN (:sysTableNames)\r\n AND INDEX_TYPE != 'PRIMARY'\r\nORDER BY INDEX_SCHEMA, TABLE_NAME, INDEX_NAME", + "metaQueryCharset": null, + "orderValue": 10, + "isEnabled": 0, + "id": "1K6TV6WJR1801" + }, + { + "defKey": "GBase 8s", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "gbasedbtjdbc_3.5.1.jar", + "jdbcReferDriver": "com.gbasedbt.jdbc.Driver", + "jdbcReferUrl": "jdbc:gbasedbt-sqli://[{ip}:{port}][/dbname]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const dataTypeArray = [\r\n 'SMALLINT',\r\n 'INT8',\r\n 'INT',\r\n 'INT8',\r\n 'INTEGER',\r\n 'REAL',\r\n 'SMALLFLOAT',\r\n 'BIGSERIAL',\r\n 'TEXT',\r\n 'BIGINT',\r\n 'DATE',\r\n 'DOUBLE PRECISION',\r\n 'BYTE'\r\n ];\r\n function getDataType(field) {\r\n const dataType = field.dbDataType?.toUpperCase();\r\n if (field.autoIncrement && dataType === 'BIGINT') {\r\n return 'SERIAL8';\r\n } else if (field.autoIncrement) {\r\n return 'SERIAL';\r\n } else if (dataTypeArray.includes(dataType)) {\r\n return field.dbDataType;\r\n } else if (dataType === 'TIMESTAMP' && field.dataLen && field.dataLen >= 1 && field.dataLen <= 6) {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n } else if (dataType === 'FLOAT' && field.dataLen && field.dataLen >= 1 && field.dataLen <= 16) {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n } else if (dataType === 'MONEY' && field.dataLen && field.dataLen >= 2 && field.dataLen <= 32) {\r\n if (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen) {\r\n return `${field.dbDataType}(${field.dataLen},${field.numScale})`;\r\n } else {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n }\r\n } else if (\r\n (dataType === 'VARCHAR' || dataType === 'NVARCHAR') &&\r\n field.dataLen &&\r\n field.dataLen >= 1 &&\r\n field.dataLen <= 255\r\n ) {\r\n if (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen) {\r\n return `${field.dbDataType}(${field.dataLen},${field.numScale})`;\r\n } else {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n }\r\n } else if (\r\n (dataType === 'DECIMAL' || dataType === 'NUMERIC') &&\r\n field.dataLen &&\r\n field.dataLen >= 1 &&\r\n field.dataLen <= 32\r\n ) {\r\n if (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen) {\r\n return `${field.dbDataType}(${field.dataLen},${field.numScale})`;\r\n } else {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n }\r\n } else if (field.dataLen && field.dataLen >= 0) {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n }\r\n return field.dbDataType;\r\n }\r\n function getConstraints(field) {\r\n let constraints = '';\r\n if (field.notNull) {\r\n constraints += ' NOT NULL';\r\n }\r\n if (field.defaultValue) {\r\n constraints += ` DEFAULT ${field.defaultValue}`;\r\n }\r\n return constraints;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}{{=field.defKey}} {{= getDataType(field) }}{{= getConstraints(field) }}{{= index < it.fields.length-1 || pkList.length>0 ? ',' : ( pkList.length > 0 ? ',' : '' ) }}{{~}}{{? pkList.length >0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i 0}}\r\nALTER TABLE {{= tableKey }} ADD CONSTRAINT PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}COMMENT ON TABLE {{= tableKey }} IS '{{=defName}}{{? defName && intro}}; {{=intro}}{{?? intro}}{{=intro}}{{?}}';{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}RENAME TABLE {{= tableKey }} TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'SERIAL8' : 'SERIAL';\n } else if(dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'SMALLFLOAT' ||\n dbDataType.toUpperCase() === 'BIGSERIAL' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DOUBLE PRECISION' ||\n dbDataType.toUpperCase() === 'BYTE') {\n return dbDataType; \n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 6) ? `(${dataLen})` : ''}`\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 16) ? `(${dataLen})` : ''}`\n } else if(dbDataType.toUpperCase() === 'MONEY') {\n return `${dbDataType} ${(dataLen && dataLen >= 2 && dataLen <= 32) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'NVARCHAR') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 255) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`; \n } else if(dbDataType.toUpperCase() === 'DECIMAL' ||\n dbDataType.toUpperCase() === 'NUMERIC') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 32) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD {{= field.defKey}} {{= finalDataType}}{{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}};\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=field.defName}}{{? field.defName && field.intro}}; {{=field.intro}}{{?? field.intro}}{{=field.intro}}{{?}}';\n{{?}}\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'SERIAL8' : 'SERIAL';\n } else if(dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'INT8' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'SMALLFLOAT' ||\n dbDataType.toUpperCase() === 'BIGSERIAL' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DOUBLE PRECISION' ||\n dbDataType.toUpperCase() === 'BYTE') {\n return dbDataType; \n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 6) ? `(${dataLen})` : ''}`\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 16) ? `(${dataLen})` : ''}`\n } else if(dbDataType.toUpperCase() === 'MONEY') {\n return `${dbDataType} ${(dataLen && dataLen >= 2 && dataLen <= 32) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'NVARCHAR') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 255) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`; \n } else if(dbDataType.toUpperCase() === 'DECIMAL' ||\n dbDataType.toUpperCase() === 'NUMERIC') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 32) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}RENAME COLUMN {{= tableKey }}.{{= preDefKey }} TO {{= field.defKey }};{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'notNull' || item === 'defaultValue' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} MODIFY {{= field.defKey }} {{= finalDataType}} {{? updateKeys.includes('notNull') }} {{? field.notNull }} NOT NULL {{??}} NULL {{?}}{{?}}{{? updateKeys.includes('defaultValue') }}{{? field.defaultValue }} DEFAULT {{= field.defaultValue}}{{?}}{{?}};\n{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=field.defName}}{{? field.defName && field.intro}}; {{=field.intro}}{{?? field.intro}}{{=field.intro}}{{?}}';\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}} {{?}}INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{? preDefKey}} {{= preDefKey}}{{??}} {{=row.defKey}}{{?}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{=row.defKey}};\n{{~}}", + "metaTableQuery": "select\r\n t.tabname as def_key,\r\n c.comments as def_name,\r\n t.owner as schema_name\r\nfrom systables t\r\n left join syscomments c on t.tabname = c.tabname\r\nwhere t.tabtype = 'T' and t.owner in (:schemaName)", + "metaColumnQuery": "SELECT DISTINCT c.colname as def_key,\r\n t.tabname as tbl_def_key,\r\n TRIM(t.owner) as schema_name,\r\n c.colno as order_value,\r\n c.colno ,\r\n CASE\r\n WHEN INSTR(c.coltypename2, '(') = 0 THEN c.coltypename2\r\n ELSE\r\n SUBSTR(c.coltypename2, 1, INSTR(c.coltypename2, '(') - 1) END as db_data_type,\r\n CASE WHEN mod(c.coltype,256) = c.coltype - 256 THEN 1 ELSE 0\r\n END\r\n AS not_null,\r\n CASE d.type\r\n WHEN 'L' THEN get_default_value(c.coltype, c.extended_id, c.collength, d.default::lvarchar(256))::VARCHAR(254)\r\n WHEN 'C' THEN 'current year to second'::VARCHAR(254)\r\n WHEN 'S' THEN 'dbservername'::VARCHAR(254)\r\n WHEN 'U' THEN 'user'::VARCHAR(254)\r\n WHEN 'T' THEN 'today'::VARCHAR(254)\r\n WHEN 'E' THEN de.default::VARCHAR(254)\r\n ELSE NULL::VARCHAR(254)\r\nEND\r\nAS default_value,\r\n CASE WHEN LENGTH(CASE WHEN c.colno IN (SELECT i.part1 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part2 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part3 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part4 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part5 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part6 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part7 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part8 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part9 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part10 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part11 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part12 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part13 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part14 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part15 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n UNION ALL SELECT i.part16 FROM sysindexes i,sysconstraints con WHERE i.idxname = con.idxname AND con.constrtype = 'P' AND con.tabid = c.tabid\r\n ) THEN 'PRI' ELSE ''\r\nEND) = 0 THEN 0 ELSE 1 END AS primary_key,\r\n CASE WHEN mod(c.coltype,256) IN (6,18,53) THEN 1 ELSE 0\r\nEND\r\nAS auto_increment,\r\n CASE lower(colauth)\r\n WHEN 's--' THEN 'select'\r\n WHEN 'su-' THEN 'select,update'\r\n WHEN 'sur' THEN 'select,update,references'\r\n WHEN '-u-' THEN 'update'\r\n WHEN '-ur' THEN 'update,references'\r\n WHEN '--r' THEN 'references'\r\n ELSE 'select,update,reference'\r\nEND\r\nAS privilege,\r\n colcomm.comments as def_name\r\nFROM syscolumnsext c\r\n LEFT JOIN systables t ON c.tabid = t.tabid\r\n LEFT JOIN sysdefaults d ON (c.tabid = d.tabid AND c.colno = d.colno)\r\n LEFT JOIN sysdefaultsexpr de ON (c.tabid = de.tabid AND c.colno = de.colno and de.type='T')\r\n LEFT JOIN syscolauth colauth ON (c.tabid = colauth.tabid )\r\n LEFT JOIN syscolcomments colcomm ON (t.tabname = colcomm.tabname AND c.colname = colcomm.colname)\r\nWHERE CONCAT(CONCAT(TRIM(' ' from t.owner), '.'), TRIM(t.tabname)) IN (:sysTableNames)\r\n and TRIM(t.owner) IN (:schemaName)\r\nORDER BY t.owner, t.tabname, order_value ", + "metaIndexQuery": "select\r\n TRIM(t.owner) as schema_name,\r\n t.tabname tbl_def_key,\r\n i.idxname def_key,\r\n '' def_name,\r\n '' intro,\r\n CASE\r\n WHEN idxtype='U'\r\n THEN 'UNIQUE'\r\n ELSE 'NORMAL'\r\n END\r\n AS type,\r\n trim(case\r\n when i.part1 > 0 then ('ASC')\r\n when i.part1 < 0 then ('DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part2 > 0 then (',ASC')\r\n when i.part2 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part3 > 0 then (',ASC')\r\n when i.part3 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part4 > 0 then (',ASC')\r\n when i.part4 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part5 > 0 then (',ASC')\r\n when i.part5 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part6 > 0 then (',ASC')\r\n when i.part6 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part7 > 0 then (',ASC')\r\n when i.part7 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part8 > 0 then (',ASC')\r\n when i.part8 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part9 > 0 then (',ASC')\r\n when i.part9 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part10 > 0 then (',ASC')\r\n when i.part10 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part11 > 0 then (',ASC')\r\n when i.part11 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part12 > 0 then (',ASC')\r\n when i.part12 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part13 > 0 then (',ASC')\r\n when i.part13 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part14 > 0 then (',ASC')\r\n when i.part14 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part15 > 0 then (',ASC')\r\n when i.part15 < 0 then (',DESC')\r\n else ('') end) ||\r\n trim(case\r\n when i.part16 > 0 then (',ASC')\r\n when i.part16 < 0 then (',DESC')\r\n else ('') end) sort_type,\r\n 1 order_value,\r\n trim(case\r\n when i.part1 > 0 then (select colname from syscolumns where colno = i.part1 and tabid = i.tabid)\r\n else (select colname from syscolumns where colno = i.part1*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part2 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part2\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part2*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part3 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part3\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part3*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part4 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part4\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part4*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part5 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part5\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part5*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part6 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part6\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part6*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part7 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part7\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part7*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part8 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part8\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part8*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part9 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part9\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part9*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part10 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part10\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part10*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part11 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part11\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part11*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part12 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part12\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part12*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part13 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part13\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part13*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part14 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part14\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part14*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part15 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part15\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part15*-1 and tabid = i.tabid) end) ||\r\n trim(case\r\n when i.part16 > 0 then (select ',' || colname\r\n from syscolumns\r\n where colno = i.part16\r\n and tabid = i.tabid)\r\n else (select ',' || colname from syscolumns where colno = i.part16*-1 and tabid = i.tabid) end) col_def_key,\r\n i.idxname\r\nfrom systables t\r\n join sysindexes i on\r\n t.tabid = i.tabid\r\nwhere t.tabid > 99\r\n and t.tabtype = 'T'\r\n and TRIM(t.owner) IN (:schemaName)\r\n and CONCAT(CONCAT(TRIM(' ' from t.owner), '.'), TRIM(t.tabname)) IN (:sysTableNames)\r\n and NOT REGEXP_LIKE(i.idxname, '^[[:space:][:digit:]]')\r\norder by t.owner, tbl_def_key, def_key, order_value", + "metaQueryCharset": null, + "orderValue": 11, + "isEnabled": 0, + "id": "1KE9YGK6H1M02" + }, + { + "defKey": "OceanBase-Oracle", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "oceanbase-client-2.4.13.jar", + "jdbcReferDriver": "com.oceanbase.jdbc.Driver", + "jdbcReferUrl": "jdbc:oceanbase://[ip]:[port]/?pool=false&user=[user]@oracle&password=[password]", + "tableCreate": "\r\n{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n function getFieldLength(field) {\r\n switch (field.dbDataType?.toUpperCase()) {\r\n case 'VARCHAR2':\r\n return `(${field.dataLen ? field.dataLen : 128})`;\r\n case 'TIMESTAMP':\r\n return field.dataLen && field.dataLen >= 1 && field.dataLen <= 9 ? `(${field.dataLen})` : '(6)';\r\n case 'INTEGER':\r\n case 'BINARY_DOUBLE':\r\n case 'DATE':\r\n case 'CLOB':\r\n case 'LONG':\r\n case 'NCLOB':\r\n case 'BLOB':\r\n return '';\r\n case 'FLOAT':\r\n return field.dataLen && field.dataLen >= 1 && field.dataLen <= 126 ? `(${field.dataLen})` : '';\r\n case 'DECIMAL':\r\n case 'NUMBER':\r\n return field.dataLen && field.dataLen >= 1 && field.dataLen <= 38 ? \r\n (field.numScale && field.numScale >= -84 && field.numScale <= 127 ? `(${field.dataLen},${field.numScale})` : `(${field.dataLen})`) : \r\n '';\r\n default:\r\n return field.dataLen ? `(${field.dataLen})` : '';\r\n }\r\n }\r\n}}\r\nBEGIN\r\n EXECUTE IMMEDIATE 'DROP TABLE {{= tableKey }}';\r\nEXCEPTION\r\n WHEN OTHERS THEN\r\n IF SQLCODE != -942 THEN -- Table does not exist error\r\n RAISE;\r\n END IF;\r\nEND;\r\n/\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{=field.dbDataType}}{{=getFieldLength(field)}}{{=field.autoIncrement ? '' : '' }}{{? field.defaultValue }} DEFAULT {{=field.defaultValue}}{{?}}{{=field.notNull?' NOT NULL' : '' }}{{= index < it.fields.length-1 ? ',' : ( pkList.length > 0 ? ',' : '' ) }}{{~}}\r\n{{? pkList.length > 0 }} \r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i < pkList.length-1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n);\r\n\r\n{{? it.defName || it.intro }} \r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n{{?}}\r\n\r\n{{~it.fields:field:index}}\r\n{{? field.defName || field.intro }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n$blankline", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{=it.defKey}} DROP PRIMARY KEY;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{=it.defKey}} ADD CONSTRAINT {{=it.defKey}}_PRIMARY_KEY PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}COMMENT ON TABLE {{=it.defKey}} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{=it.defKey}} RENAME TO {{=defKey}}; {{?}}", + "tableDelete": "BEGIN\r\n EXECUTE IMMEDIATE 'DROP TABLE {{=it.defKey}}';\r\nEXCEPTION\r\n WHEN OTHERS THEN\r\n IF SQLCODE != -942 THEN -- Table does not exist error\r\n RAISE;\r\n END IF;\r\nEND;\r\n/", + "columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeDataLen = (dataLen, maxDataLen, defaultDataLen) => {\r\n if(!dataLen) {\r\n return defaultDataLen;\r\n }\r\n if(dataLen >= 0 && dataLen <= maxDataLen) {\r\n return dataLen;\r\n }\r\n return defaultDataLen;\r\n \r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR2') {\r\n return `${dbDataType} (${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType} (${computeDataLen(dataLen, 9, 6)})`;\r\n } else if(dbDataType.toUpperCase() === 'INTEGER' ||\r\n dbDataType.toUpperCase() === 'BINARY_DOUBLE' ||\r\n dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'CLOB' ||\r\n dbDataType.toUpperCase() === 'LONG' ||\r\n dbDataType.toUpperCase() === 'NCLOB' ||\r\n dbDataType.toUpperCase() === 'BLOB') {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 126) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL' ||\r\n dbDataType.toUpperCase() === 'NUMBER') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= -84 && numScale <= 127) ? `(${dataLen},${numScale})` : `(${dataLen})`) : ''}`; \r\n } else if(dataLen && dataLen >= 0) {\r\n return `${dbDataType} (${dataLen})`\r\n }\r\n return dbDataType;\r\n \r\n };\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const finalDataType = computeDatatype(field);\r\n}}\r\nALTER TABLE {{= it.defKey}} ADD {{= field.defKey }} {{= finalDataType }} {{? field.defaultValue}} DEFAULT {{=field.defaultValue}}{{?}}{{? field.notNull}} NOT NULL{{?}};\r\n{{? field.defName || field.intro }}\r\nCOMMENT ON COLUMN {{= it.defKey}}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}", + "columnUpdate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeDataLen = (dataLen, maxDataLen, defaultDataLen) => {\r\n if(!dataLen) {\r\n return defaultDataLen;\r\n }\r\n if(dataLen >= 0 && dataLen <= maxDataLen) {\r\n return dataLen;\r\n }\r\n return defaultDataLen;\r\n \r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR2') {\r\n return `${dbDataType} (${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType} (${computeDataLen(dataLen, 9, 6)})`;\r\n } else if(dbDataType.toUpperCase() === 'INTEGER' ||\r\n dbDataType.toUpperCase() === 'BINARY_DOUBLE' ||\r\n dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'CLOB' ||\r\n dbDataType.toUpperCase() === 'LONG' ||\r\n dbDataType.toUpperCase() === 'NCLOB' ||\r\n dbDataType.toUpperCase() === 'BLOB') {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'FLOAT') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 126) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL' ||\r\n dbDataType.toUpperCase() === 'NUMBER') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= -84 && numScale <= 127) ? `(${dataLen},${numScale})` : `(${dataLen})`) : ''}`; \r\n } else if(dataLen && dataLen >= 0) {\r\n return `${dbDataType} (${dataLen})`\r\n }\r\n return dbDataType;\r\n \r\n };\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n const finalDataType = computeDatatype(field);\r\n const preDefKey = field?.baseUpdate?.pre?.defKey;\r\n const nextDefKey = field?.baseUpdate?.next?.defKey;\r\n}}\r\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= it.defKey}} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};{{?}}\r\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale') }}\r\nALTER TABLE {{= it.defKey}} MODIFY {{=field.defKey}} {{=finalDataType}};\r\n{{?}}\r\n{{? updateKeys.includes('notNull') }}ALTER TABLE {{= it.defKey}} MODIFY {{=field.defKey}} {{? field.notNull }} NOT NULL {{??}} NULL {{?}};{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON COLUMN {{= it.defKey}}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.includes('defaultValue') }}\r\nALTER TABLE {{= it.defKey}} MODIFY {{=field.defKey}} DEFAULT {{=field.defaultValue}};\r\n{{?}}\r\n{{~}}", + "columnDelete": "{{\r\n let fieldsUpdate = it.fieldsUpdate; \r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{=it.defKey}} DROP COLUMN {{=field.defKey}};\r\n{{~}}", + "indexCreate": "{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE{{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{=it.defKey}} (\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX {{? preDefKey}} {{= preDefKey}} {{??}} {{=row.defKey}} {{?}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX {{=row.defKey}} ON {{=it.defKey}} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\r\n let indexesUpdate = it.indexesUpdate; \r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~indexesUpdate:row:i}}\r\nBEGIN\r\n EXECUTE IMMEDIATE 'DROP INDEX {{= schemaName }}{{=row.defKey}}';\r\nEXCEPTION\r\n WHEN OTHERS THEN\r\n IF SQLCODE!= -1418 THEN -- Index does not exist error\r\n RAISE;\r\n END IF;\r\nEND;\r\n{{~}}", + "metaTableQuery": "SELECT\n\t\t'' as id,\n t.table_name AS def_key,\n c.comments AS def_name,\n t.OWNER AS schema_name\nFROM all_tables t left join all_tab_comments c on t.OWNER=c.OWNER and t.TABLE_NAME=c.TABLE_NAME\nwhere upper(t.OWNER) in (:schemaName) order by def_key", + "metaColumnQuery": "SELECT\r col.owner AS schema_name,\r\tcol.table_name AS tbl_def_key,\r\tcol.column_id AS order_value,\r\tcol.column_name AS def_key,\r\tclc.comments AS def_name,\r\t'' AS intro,\r\tcol.data_type AS db_data_type,\r\tnvl(col.data_precision,col.data_length) AS data_len,\r\tcol.data_scale AS num_scale,\r\tdecode(col.nullable,'Y',0,1) AS not_null,\r\tCASE WHEN cc.constraint_name IS NOT NULL THEN 1 ELSE 0 END AS primary_key,\r\t--'' AS auto_increment,\r\t\tCASE WHEN col.data_default ='SEQUENCE.NEXTVAL' THEN 1 ELSE 0 END AS auto_increment,\r\tCASE WHEN col.data_default ='SEQUENCE.NEXTVAL' THEN '' ELSE col.data_default END AS default_value\r\t --col.data_default AS default_value\rFROM\r\tall_tab_columns col LEFT JOIN all_col_comments clc ON col.OWNER = clc.OWNER AND col.table_name = clc.table_name AND col.column_name = clc.column_name \r\t LEFT JOIN (all_cons_columns cc JOIN all_constraints cs ON cc.constraint_name = cs.constraint_name AND cc.owner = cs.owner and cs.constraint_type = 'P') on col.owner=cc.owner and col.table_name=cc.table_name and col.column_name = cc.column_name\rWHERE\r\tcol.owner in (:schemaName)\r\tAND CONCAT(CONCAT(col.owner, '.') , col.table_name) in (:sysTableNames)\rORDER BY\r\tcol.owner ASC, col.table_name ASC,col.column_id ASC ", + "metaIndexQuery": "SELECT i.TABLE_OWNER AS schema_name,\n i.table_name AS TBL_DEF_KEY,\n ic.column_name AS COL_DEF_KEY,\n i.index_name AS DEF_KEY,\n CASE\n WHEN i.uniqueness = 'UNIQUE' THEN 'UNIQUE'\n ELSE 'NORMAL'\n END AS TYPE,\n CASE\n WHEN ic.descend = 'DESC' THEN 'DESC'\n ELSE 'ASC'\n END AS SORT_TYPE,\n ic.column_position AS ORDER_VALUE,\n NULL AS INTRO -- Oracle does not have a direct equivalent for INDEX_COMMENT\nFROM user_indexes i\n LEFT JOIN all_ind_columns ic ON i.index_name = ic.index_name AND i.table_name = ic.table_name\nWHERE i.TABLE_OWNER in (:schemaName)\n AND CONCAT(CONCAT(i.TABLE_OWNER, '.') , i.table_name) IN (:sysTableNames)\nORDER BY i.TABLE_OWNER, i.table_name, i.index_name, ic.column_position;", + "metaQueryCharset": null, + "orderValue": 12, + "isEnabled": 0, + "id": "BPMCJTYLY1UAC" + }, + { + "defKey": "OceanBase-Mysql", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "mysql-connector-j-8.3.0.jar", + "jdbcReferDriver": "com.mysql.cj.jdbc.Driver", + "jdbcReferUrl": "jdbc:mysql://[ip]:[port]/[dbname]?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n const dataType = dbDataType.toUpperCase();\r\n if (['VARCHAR','NVARCHAR','VARBINARY'].includes(dataType)) {\r\n return `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n } else if (['DATE','YEAR','TINYTEXT','MEDIUMTEXT','LONGTEXT','TINYBLOB','MEDIUMBLOB','LONGBLOB','BOOLEAN','FLOAT','JSON'].includes(dataType)) {\r\n return dataType;\r\n } else if(['SET','ENUM'].includes(dataType)){\r\n return `${dataType}(${field.defaultValue})`;\r\n } else if (dataType === 'TIMESTAMP') {\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 6 ? `${dataType}(${field.dataLen})` : dataType;\r\n } else if (dataType === 'DOUBLE') {\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 255 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen},${field.numScale})` : `${dataType}(${field.dataLen},0)`) : `${dataType}`;\r\n } else if (dataType === 'DECIMAL') {\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 65 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen},${field.numScale})` : `${dataType}(${field.dataLen})`) : `${dataType}`;\r\n } else {\r\n return field.dataLen && field.dataLen >= 0 ? `${dataType}(${field.dataLen})` : `${dataType}`;\r\n }\r\n }\r\n\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const notNull = field.notNull ? ' NOT NULL' : '';\r\n const autoIncrement = field.autoIncrement ? ' AUTO_INCREMENT' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n if(field?.dbDataType?.toUpperCase()==='SET'||\r\n field?.dbDataType?.toUpperCase()==='ENUM'){\r\n defaultValue=field.defaultValue ? ` DEFAULT (\"${field.defaultValue}\")` : '';\r\n }\r\n const comment = ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n return `${dataType}${notNull}${autoIncrement}${defaultValue}${comment}${index < fields.length - 1 || pkList.length > 0 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n `{{=field.defKey}}` {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n{{? pkList.length > 0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}`{{= pkName }}`{{= i < pkList.length - 1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n) COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n$blankline\r\n", + "tableUpdate": "{{\n let defKey = it.baseUpdate.next.defKey;\n let defName = it.baseUpdate.next.defName;\n let intro = it.baseUpdate.next.intro;\n let indexFields = it.indexFields;\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\n}}\n{{? isPrimaryKeyModified }}\nALTER TABLE {{=it.defKey}} DROP PRIMARY KEY;\n{{? indexFields && indexFields.length > 0}}\nALTER TABLE {{=it.defKey}} ADD PRIMARY KEY ({{~indexFields:field:i}}`{{= field.defKey }}`{{= i < indexFields.length-1 ? ',' : '' }}{{~}})\n{{?}}\n{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}ALTER TABLE {{=it.defKey}} COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}'';{{?}}\n$blankline\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{=it.defKey}} RENAME TO {{=defKey}};{{?}}\n", + "tableDelete": "DROP TABLE IF EXISTS {{=it.defKey}};", + "columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, dbDataType, primaryKey } = field;\r\n if(!defaultValue){\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON')) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return `DEFAULT \"${defaultValue}\"`;\r\n } else {\r\n return `DEFAULT ${defaultValue}`;\r\n }\r\n };\r\n const computeType = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{=it.defKey}}\r\nADD COLUMN `{{=field.defKey}}` {{=computeType(field)}} {{= field.notNull ? 'NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT ' : '' }}{{= computeDefaultValue(field)}} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{~}}\r\n", + "columnUpdate": "{{ \r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, primaryKey } = field;\r\n const dbDataType = field.dbDataType ? field.dbDataType : '';\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON') ||\r\n primaryKey) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return `\"${defaultValue}\"`;\r\n } else {\r\n return defaultValue;\r\n }\r\n };\r\n const computeType = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n}}{{~fieldsUpdate:field:index}}\r\n{{ \r\n let nextPrimaryKey = field.baseUpdate.next.primaryKey;\r\n let prePrimaryKey = field.baseUpdate.pre.primaryKey;\r\n let preDefKey = field.baseUpdate.pre.defKey;\r\n let updateKeys = field.baseUpdate.updateKeys.split(',');\r\n}}{{? updateKeys.includes('primaryKey') && updateKeys.includes('defaultValue')}}\r\nALTER TABLE `{{=it.defKey}}`\r\n ALTER COLUMN `{{=field.defKey}}` SET DEFAULT {{=field.defaultValue}};\r\n{{?}}\r\nALTER TABLE {{=it.defKey}}\r\n{{? updateKeys.includes('defKey')}} CHANGE `{{=preDefKey}}` `{{=field.defKey}}` {{??}} MODIFY COLUMN `{{=field.defKey}}`{{?}} {{=computeType(field)}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= computeDefaultValue(field)}}COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{~}}\r\n", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n}}\n{{~fieldsUpdate:field:index}}ALTER TABLE {{=it.defKey}} DROP COLUMN {{=field.defKey}};{{~}}", + "indexCreate": "{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}}INDEX {{=row.defKey}} ON {{=it.defKey}} (\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}} \r\n) COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n}}\n{{~indexesUpdate:row:index}}\n{{\n let updateKeys = row.baseUpdate.updateKeys.split(',');\n let preDefKey = row.baseUpdate.pre.defKey;\n}}\nALTER TABLE {{=it.defKey}}\nDROP INDEX {{? updateKeys.includes('defKey')}}`{{=preDefKey}}` {{??}} `{{=row.defKey}}` {{?}}, \nADD {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX `{{=row.defKey}}`(\n {{~row.fields:field:idx}}\n `{{=field.fieldDefKey}}`{{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n) COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{~}}", + "indexDelete": "{{\r\n let indexesUpdate = it.indexesUpdate; \r\n}}\r\n{{~indexesUpdate:index:i}}ALTER TABLE {{=it.defKey}} DROP INDEX {{=index.defKey}};{{~}}", + "metaTableQuery": "SELECT\n null AS id,\n table_name AS def_key,\n table_comment AS def_name,\n table_schema AS schema_name\nFROM\n information_schema.tables\nWHERE table_type = 'BASE TABLE'\n and table_schema = :schemaName", + "metaColumnQuery": "SELECT\n table_name AS tbl_def_key,\n ordinal_position as order_value,\n column_name AS def_key,\n column_comment AS def_name,\n '' AS intro,\n data_type AS db_data_type,\n IF(data_type = column_type,NULL,COALESCE ( character_maximum_length, numeric_precision )) AS data_len,\n IF(data_type = column_type, NULL, numeric_scale ) AS num_scale,\n IF(column_key = 'PRI', 1, 0 ) AS primary_key,\n IF(is_nullable = 'YES', 0, 1 ) AS not_null,\n IF(extra = 'AUTO_INCREMENT', 1, 0 ) AS auto_increment,\n column_default AS default_value\nFROM\n information_schema.COLUMNS\nWHERE\n table_schema = :schemaName\n and table_name in (:sysTableNames)\nORDER BY\n table_name ASC,\n ordinal_position ASC", + "metaIndexQuery": "SELECT TABLE_NAME AS TBL_DEF_KEY,\r\n COLUMN_NAME AS COL_DEF_KEY,\r\n INDEX_COMMENT AS DEF_NAME,\r\n COMMENT AS INTRO,\r\n IF (COLLATION = 'A', 'ASC', 'DESC') AS SORT_TYPE,\r\n IF (NON_UNIQUE = 1, 'NORMAL', 'UNIQUE') AS TYPE,\r\n SEQ_IN_INDEX AS ORDER_VALUE,\r\n INDEX_NAME AS DEF_KEY FROM information_schema.STATISTICS\r\n WHERE INDEX_SCHEMA = :schemaName AND TABLE_NAME IN (:sysTableNames) AND INDEX_NAME != 'PRIMARY'\r\nORDER BY TABLE_NAME, INDEX_NAME", + "metaQueryCharset": null, + "orderValue": 13, + "isEnabled": 0, + "id": "1K6TUVS7V1802" + }, + { + "defKey": "XuguDB", + "defName": null, + "icon": "", + "driverFiles": "xugu-jdbc-12.2.0.jar", + "jdbcReferDriver": "com.xugu.cloudjdbc.Driver", + "jdbcReferUrl": "jdbc:xugu://[ip]:[port]/[database]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return ''\r\n }\r\n const dataType = dbDataType.toUpperCase();\r\n if (dataType === 'VARCHAR') {\r\n return `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n } else if ( ['TINYINT','SMALLINT','INTEGER','BIGINT','SMALLSERIAL','FLOAT','DOUBLE','BOOL','DATE','DATETIME','TIME','BLOB','CLOB','BINARY'].includes(dataType)) {\r\n return dataType;\r\n } else if (dataType === 'NUMERIC') {\r\n return field.dataLen && field.dataLen >= 1 && field.dataLen <= 38 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen}, ${field.numScale})`: `${dataType}(${field.dataLen})`) : `${dataType}`;\r\n } else {\r\n return field.dataLen && field.dataLen >= 0 ? `${dataType}(${field.dataLen})` : dataType;\r\n }\r\n }\r\n\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const notNull = field.notNull ? ' NOT NULL' : ' NULL';\r\n const autoIncrement = field.autoIncrement ? ' AUTO_INCREMENT' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n const comment = ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n return `${field.defKey} ${dataType}${notNull}${autoIncrement}${defaultValue}${comment}${index < fields.length - 1 || pkList.length > 0 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n{{? pkList.length > 0 }}\r\n CONSTRAINT {{= it.defKey}}_constraint_name PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i < pkList.length - 1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n) COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP CONSTRAINT {{= it.defKey}}_constraint_name;\r\n{{? indexFields && indexFields.length > 0 || defKey}}\r\nALTER TABLE {{= tableKey }} ADD CONSTRAINT {{= it.defKey}}_constraint_name PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'TINYINT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'SMALLSERIAL' ||\n dbDataType.toUpperCase() === 'FLOAT' ||\n dbDataType.toUpperCase() === 'DOUBLE' ||\n dbDataType.toUpperCase() === 'BOOL' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'TIME' ||\n dbDataType.toUpperCase() === 'BLOB' ||\n dbDataType.toUpperCase() === 'CLOB' ||\n dbDataType.toUpperCase() === 'BINARY' ||\n dbDataType.toUpperCase().startsWith('INTERVAL')) {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'NUMERIC') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey}} {{= finalDataType}} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }}{{? field.notNull}} NOT NULL {{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'TINYINT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'SMALLSERIAL' ||\n dbDataType.toUpperCase() === 'FLOAT' ||\n dbDataType.toUpperCase() === 'DOUBLE' ||\n dbDataType.toUpperCase() === 'BOOL' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'TIME' ||\n dbDataType.toUpperCase() === 'BLOB' ||\n dbDataType.toUpperCase() === 'CLOB' ||\n dbDataType.toUpperCase() === 'BINARY' ||\n dbDataType.toUpperCase().startsWith('INTERVAL')) {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'NUMERIC') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{=finalDataType}};\n{{?}}\n{{? updateKeys.includes('notNull') }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.notNull }} SET {{??}} DROP {{?}} NOT NULL;{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nCOMMENT ON COLUMN {{= tableKey }}.{{= field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{? updateKeys.includes('defaultValue') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} {{? field.defaultValue }} SET DEFAULT {{=field.defaultValue}}{{??}} DROP DEFAULT {{?}};\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE{{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{? field.sortType && field.sortType.toUpperCase() === 'DESC'}} {{=field.sortType}}{{?}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX {{= tableKey }}.{{=row.defKey}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{? field.sortType && field.sortType.toUpperCase() === 'DESC'}} {{=field.sortType}}{{?}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX {{= tableKey }}.{{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT\r\n T.TABLE_NAME AS DEF_KEY,\r\n T.COMMENTS AS DEF_NAME,\r\n S.SCHEMA_NAME AS SCHEMA_NAME\r\nFROM DBA_TABLES T LEFT JOIN DBA_SCHEMAS S ON T.SCHEMA_ID = S.SCHEMA_ID\r\nAND S.SCHEMA_NAME IN (:schemaName)", + "metaColumnQuery": "SELECT\r\n TRIM(S.SCHEMA_NAME) AS SCHEMA_NAME,\r\n T.TABLE_NAME AS TBL_DEF_KEY,\r\n C.COL_NAME AS DEF_KEY,\r\n C.COMMENTS AS DEF_NAME,\r\n C.TYPE_NAME AS DB_DATA_TYPE,\r\n C.SCALE AS DATA_LEN,\r\n CASE WHEN C.NOT_NULL IS TRUE THEN 1 ELSE 0 END AS NOT_NULL,\r\n DEF_VAL AS default_value,\r\n IS_SERIAL AS auto_increment\r\nFROM DBA_TABLES T\r\n LEFT JOIN DBA_SCHEMAS S ON T.SCHEMA_ID = S.SCHEMA_ID\r\n LEFT JOIN DBA_COLUMNS C ON T.TABLE_ID = C.TABLE_ID\r\nWHERE TRIM(S.SCHEMA_NAME) IN (:schemaName) AND CONCAT(TRIM(S.SCHEMA_NAME), '.', TRIM(T.TABLE_NAME)) IN (:sysTableNames)\r\nORDER BY S.SCHEMA_NAME, TBL_DEF_KEY, C.COL_NO", + "metaIndexQuery": "SELECT DS.SCHEMA_NAME AS SCHEMA_NAME,\r\n DT.TABLE_NAME AS TBL_DEF_KEY,\r\n DC.COL_NAME AS COL_DEF_KEY,\r\n DI.INDEX_NAME AS DEF_KEY,\r\n DC.COL_NO AS ORDER_VALUE,\r\n '' AS DEF_NAME,\r\n '' AS DEF_NAME,\r\n CASE WHEN DI.IS_UNIQUE IS TRUE THEN 'UNIQUE' ELSE 'NORMAL' END AS TYPE,\r\n CASE\r\n WHEN INSTR(DI.KEYS, CONCAT('\"', DC.COL_NAME, '\" DESC')) > 0 THEN 'DESC'\r\n ELSE 'ASC'\r\n END AS SORT_TYPE\r\nFROM DBA_INDEXES DI\r\n LEFT JOIN DBA_TABLES DT ON DI.TABLE_ID = DT.TABLE_ID\r\n LEFT JOIN DBA_COLUMNS DC ON (DT.TABLE_ID = DC.TABLE_ID AND POSITION(DI.KEYS, DC.COL_NAME) != 0)\r\n LEFT JOIN DBA_SCHEMAS DS ON DT.SCHEMA_ID = DS.SCHEMA_ID\r\nWHERE TRIM(DS.SCHEMA_NAME) IN (:schemaName) AND CONCAT(TRIM(DS.SCHEMA_NAME), '.', TRIM(DT.TABLE_NAME)) IN (:sysTableNames) AND IS_PRIMARY = 0\r\nORDER BY DS.SCHEMA_NAME, TBL_DEF_KEY, DEF_KEY, ORDER_VALUE", + "metaQueryCharset": null, + "orderValue": 14, + "isEnabled": 0, + "id": "1K6TWWNW01802" + }, + { + "defKey": "HighGo", + "defName": null, + "icon": "", + "driverFiles": "HgdbJdbc-6.0.3.jre8.jar", + "jdbcReferDriver": "com.highgo.jdbc.Driver", + "jdbcReferUrl": "jdbc:highgo://[ip]:[port]/[database]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n function formatDataType(field) {\r\n const supportedDataTypes = [\r\n 'SMALLINT',\r\n 'INTEGER',\r\n 'BIGINT',\r\n 'SMALLSERIAL',\r\n 'BIGSERIAL',\r\n 'REAL',\r\n 'DOUBLE PRECISION',\r\n 'DATE',\r\n 'TEXT',\r\n 'BYTEA',\r\n 'MONEY',\r\n 'BOOLEAN',\r\n 'SERIAL',\r\n 'JSON',\r\n 'INTERVAL'\r\n ];\r\n if (field.autoIncrement) {\r\n return field.dbDataType?.toUpperCase() === 'BIGINT' ? 'BIGSERIAL' : 'SERIAL';\r\n }\r\n if (supportedDataTypes.includes(field.dbDataType?.toUpperCase())) {\r\n return field.dbDataType;\r\n }\r\n if (field.dbDataType?.toUpperCase() === 'TIME' ||\r\n field.dbDataType?.toUpperCase() === 'TIMESTAMP') {\r\n if (field.dataLen && field.dataLen >= 0 && field.dataLen <= 6) {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n }\r\n return field.dbDataType;\r\n }\r\n if (field.dbDataType?.toUpperCase() === 'NUMERIC' ||\r\n field.dbDataType?.toUpperCase() === 'DECIMAL') {\r\n if (field.dataLen && field.dataLen >= 1 && field.dataLen <= 1000) {\r\n if (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen) {\r\n return `${field.dbDataType}(${field.dataLen},${field.numScale})`;\r\n }\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n }\r\n return field.dbDataType;\r\n }\r\n if (field.dataLen && field.dataLen >= 0) {\r\n return `${field.dbDataType}(${field.dataLen})`;\r\n }\r\n return field.dbDataType;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n {{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}{{=field.defKey}} {{= formatDataType(field) }}{{= field.notNull ? ' NOT NULL' : '' }}{{? !field.autoIncrement && field.defaultValue }} DEFAULT {{= field.defaultValue }}{{?}}{{= index < it.fields.length-1 || pkList.length>0 ? ',' : '' }}\r\n {{~}}\r\n {{? pkList.length > 0 }}PRIMARY KEY ({{= pkList.join(', ')}}){{?}}\r\n);\r\n\r\n\r\n{{~it.fields:field:index}}\r\n{{? field.defName || field.intro }}\r\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n\r\n{{? it.defName || it.intro }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}';\r\n{{?}}\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nDO $$\r\n DECLARE\r\n pk_constraint_name text;\r\n BEGIN\r\n SELECT constraint_name\r\n INTO pk_constraint_name\r\n FROM information_schema.table_constraints\r\n WHERE table_name = '{{=it.defKey}}' AND constraint_type = 'PRIMARY KEY'\r\n LIMIT 1;\r\n\r\n IF pk_constraint_name IS NOT NULL THEN\r\n EXECUTE 'ALTER TABLE {{= tableKey }} DROP CONSTRAINT ' || pk_constraint_name;\r\n ELSE\r\n RAISE NOTICE 'No primary key constraint found for the table.';\r\n END IF;\r\nEND $$;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}\"{{= field.defKey }}\"{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}COMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}';{{?}}\r\n$blankline\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{= defKey }};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGSERIAL' : 'SERIAL';\n }\n if(dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'SMALLSERIAL' ||\n dbDataType.toUpperCase() === 'BIGSERIAL' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'DOUBLE PRECISION' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'SERIAL' ||\n dbDataType.toUpperCase() === 'JSON' ||\n dbDataType.toUpperCase().startsWith('INTERVAL')) {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'TIME' ||\n dbDataType.toUpperCase() === 'TIMESTAMP') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`; \n } else if(dbDataType.toUpperCase() === 'NUMERIC' || \n dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 1000) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType}(${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD {{= field.defKey}} {{= finalDataType}}{{? field.notNull}} NOT NULL{{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}};\n{{? field.defName || field.intro }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(autoIncrement) {\n return dbDataType.toUpperCase() === 'BIGINT' ? 'BIGSERIAL' : 'SERIAL';\n }\n if(dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'INTEGER' ||\n dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'SMALLSERIAL' ||\n dbDataType.toUpperCase() === 'BIGSERIAL' ||\n dbDataType.toUpperCase() === 'REAL' ||\n dbDataType.toUpperCase() === 'DOUBLE PRECISION' ||\n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'TEXT' ||\n dbDataType.toUpperCase() === 'BYTEA' ||\n dbDataType.toUpperCase() === 'MONEY' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'SERIAL' ||\n dbDataType.toUpperCase() === 'JSON' ||\n dbDataType.toUpperCase().startsWith('INTERVAL')) {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'TIME' ||\n dbDataType.toUpperCase() === 'TIMESTAMP') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`; \n } else if(dbDataType.toUpperCase() === 'NUMERIC' || \n dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 1000) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType}(${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey}} TO {{= nextDefKey}};{{?}}\n{{? updateKeys.includes('defaultValue') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}}{{? field.defaultValue }} SET DEFAULT {{=field.defaultValue}}{{??}} DROP DEFAULT{{?}};\n{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'autoIncrement') }}\nALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} SET DATA TYPE {{=finalDataType}} USING {{= field.defKey }}::{{=finalDataType}};\n{{?}}\n{{? updateKeys.includes('notNull') && field.notNull }}ALTER TABLE {{= tableKey }} ALTER COLUMN {{= field.defKey}} SET NOT NULL;{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\nCOMMENT ON COLUMN {{= tableKey }}.{{=field.defKey}} IS '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}} {{?}}INDEX {{=row.defKey}} ON {{= tableKey }}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n);\r\n{{?}}\r\n{{? row.defName || row.intro }}\r\nCOMMENT ON INDEX {{= schemaName }} {{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{= schemaName }}{{? preDefKey}} {{= preDefKey}} {{??}} {{=row.defKey}} {{?}};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{=field.sortType}} {{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n);\n{{?}}\n{{? (row.defName || row.intro) && row.defKey && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}';\n{{?}}\n{{??}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') && row.fields.length > 0}}\nCOMMENT ON INDEX {{= schemaName }}{{=row.defKey}} IS '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}'\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{= schemaName }}{{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT c.relname AS def_key,\r\n CAST(obj_description(c.relfilenode, 'pg_class') AS varchar) AS def_name,\r\n n.nspname AS schema_name\r\nFROM pg_class AS c\r\n JOIN pg_tables AS b ON c.relname = b.tablename\r\n JOIN pg_namespace AS n ON b.schemaname = n.nspname AND c.relnamespace = n.oid\r\nWHERE b.schemaname IN (:schemaName);", + "metaColumnQuery": " -- select col.table_schema as schema_name, col.table_name as tbl_def_key, col.ordinal_position as order_value, col.column_name as def_key, d.description as def_name, col.udt_name as db_data_type,\r\n -- col.character_maximum_length as data_length, col.numeric_scale as num_scale, case when tc.constraint_type = 'PRIMARY KEY' then 1 else 0 end as primary_key, case when col.is_nullable = 'YES' then 0 else 1 end as not_null,\r\n -- col.column_default as default_value from information_schema.columns col\r\n -- inner join pg_class c on c.relname = col.table_name inner join pg_tables b on c.relname = b.tablename inner join pg_namespace n on b.schemaname = n.nspname and c.relnamespace = n.oid\r\n -- left join pg_description d on d.objoid = c.oid and d.objsubid = col.ordinal_position left join information_schema.key_column_usage tku on tku.table_name = col.table_name and tku.column_name = col.column_name left join information_schema.table_constraints tc on tc.constraint_name = tku.constraint_name\r\n -- where 1 = 1 and b.schemaname in (:schemaName) and CONCAT(TRIM(b.schemaname), '.', TRIM(col.table_name)) in (:sysTableNames) and CONCAT(TRIM(col.table_schema), '.', TRIM(col.table_name)) in (:sysTableNames)\r\n -- and col.table_schema in (:schemaName) order by col.table_schema asc, col.table_name asc, col.ordinal_position asc\r\n \r\n \r\nSELECT\r\n col.table_schema as schema_name,\r\n col.TABLE_NAME AS tbl_def_key,\r\n col.ordinal_position AS order_value,\r\n col.COLUMN_NAME AS def_key,\r\n d.description AS def_name,\r\n '' AS intro,\r\n col.udt_name AS db_data_type,\r\n CASE WHEN col.character_maximum_length IS NULL AND col.numeric_precision IS NOT NULL THEN col.numeric_precision\r\n ELSE col.character_maximum_length\r\n END AS data_len,\r\n CASE WHEN col.numeric_precision IS NOT NULL THEN (CASE WHEN col.numeric_scale = 0 THEN NULL ELSE col.numeric_scale END)\r\n ELSE NULL\r\n END AS num_scale,\r\n CASE WHEN kc.column_name IS NOT NULL THEN 1 ELSE 0 END AS primary_key,\r\n CASE WHEN col.IS_NULLABLE = 'NO' THEN 1 ELSE 0 END AS not_null,\r\n CASE WHEN col.COLUMN_DEFAULT LIKE 'nextval%' THEN 1 ELSE 0 END AS auto_increment,\r\n -- substr(col.column_default,0,strpos(col.column_default, concat('::',col.data_type))) AS default_value\r\n CASE\r\n WHEN strpos(col.column_default, concat('::',col.data_type)) = 0 THEN (CASE\r\n WHEN col.column_default LIKE 'nextval%' THEN ''\r\n ELSE col.column_default\r\n END)\r\n ELSE substr(col.column_default,0,strpos(col.column_default, concat('::',col.data_type)))\r\n END AS default_value\r\nFROM\r\n information_schema.COLUMNS col LEFT JOIN (information_schema.key_column_usage kc LEFT JOIN information_schema.table_constraints tc\r\n ON\r\n kc.constraint_name = tc.constraint_name\r\n and tc.constraint_type = 'PRIMARY KEY'\r\n and kc.table_schema=tc.table_schema\r\n and kc.table_name=tc.table_schema\r\n ) ON\r\n col.TABLE_NAME = kc.table_name\r\n AND col.COLUMN_NAME = kc.column_name AND kc.table_schema = col.table_schema\r\n LEFT JOIN pg_class C ON C.relname = col.TABLE_NAME\r\n LEFT JOIN pg_namespace n ON col.table_schema = n.nspname AND c.relnamespace = n.oid\r\n LEFT JOIN pg_description d ON d.objoid = C.oid AND d.objsubid = col.ordinal_position\r\nWHERE\r\n col.table_schema IN (:schemaName)\r\n AND nspName IN (:schemaName)\r\n AND CONCAT(col.table_schema, '.', col.TABLE_NAME) IN (:sysTableNames)\r\nORDER BY\r\n col.table_schema asc, col.TABLE_NAME asc,col.ordinal_position ASC\r\n ", + "metaIndexQuery": "SELECT ns.nspname AS schema_name,\r\n t.relname AS tbl_def_key,\r\n a.attname AS col_def_key,\r\n d.description AS def_name,\r\n d.description AS intro,\r\n CASE\r\n WHEN ix.indoption[array_position(ix.indkey, a.attnum) - 1] & 1 = 0 THEN 'ASC'\r\n ELSE 'DESC'\r\n END AS sort_type,\r\n CASE\r\n WHEN ix.indisunique THEN 'UNIQUE'\r\n ELSE 'NORMAL'\r\n END AS type,\r\n array_position(ix.indkey, a.attnum) AS order_value,\r\n idx.relname AS def_key\r\nFROM pg_class t\r\n JOIN\r\n pg_namespace ns ON ns.oid = t.relnamespace\r\n JOIN\r\n pg_index ix ON t.oid = ix.indrelid\r\n JOIN\r\n pg_class idx ON ix.indexrelid = idx.oid\r\n JOIN\r\n unnest(ix.indkey) WITH ORDINALITY AS key_col(attnum, ord) ON true\r\n JOIN\r\n pg_attribute a ON t.oid = a.attrelid AND a.attnum = key_col.attnum\r\n LEFT JOIN\r\n pg_description d ON idx.oid = d.objoid\r\nWHERE ns.nspname IN (:schemaName)\r\n AND CONCAT(TRIM(ns.nspname), '.', TRIM(t.relname)) IN (:sysTableNames)\r\n AND indisprimary = false\r\nORDER BY ns.nspname, \r\n tbl_def_key,\r\n def_key", + "metaQueryCharset": null, + "orderValue": 15, + "isEnabled": 0, + "id": "1K6TXL42H1802" + }, + { + "defKey": "Hive", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "hive-jdbc-3.1.2-standalone.jar;mysql-connector-j-8.3.0.jar;postgresql-42.7.3.jar;", + "jdbcReferDriver": "org.apache.hive.jdbc.HiveDriver", + "jdbcReferUrl": "jdbc:hive2://[ip]:[port]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n function addField(field, pkList) {\r\n let fieldStr = `${field.defKey} ${field.dbDataType}`;\r\n if (['VARCHAR', 'CHAR'].includes(field.dbDataType?.toUpperCase())) {\r\n fieldStr += `(${field.dataLen ? field.dataLen : 128})`;\r\n } else if (field.dbDataType?.toUpperCase() === 'DECIMAL' && field.dataLen && field.dataLen >= 1 && field.dataLen <= 38) {\r\n if (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen) {\r\n fieldStr += `(${field.dataLen},${field.numScale})`;\r\n } else {\r\n fieldStr += `(${field.dataLen})`;\r\n }\r\n }\r\n if (field.defName || field.intro) {\r\n fieldStr += ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n }\r\n if (field.primaryKey) {\r\n pkList.push(field.defKey);\r\n }\r\n return `${fieldStr}${index < it.fields.length - 1 ? ',' : ''}`;\r\n }\r\n}}\r\n\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{= addField(field, pkList) }}{{~}}{{? pkList.length > 0 }},\r\n CONSTRAINT {{= it.defKey}}_constraint_name PRIMARY KEY ({{= pkList.join(', ')}}) DISABLE NOVALIDATE{{?}}\r\n);\r\n$blankline\r\n\r\n{{? it.defName || it.intro }}\r\nALTER TABLE {{= tableKey }} SET TBLPROPERTIES ('comment' = '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}');\r\n{{?}}\r\n$blankline\r\n\r\n\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP CONSTRAINT {{= it.defKey}}_constraint_name;\r\n{{? indexFields && indexFields.length > 0 || defKey}}\r\nALTER TABLE {{= tableKey }} ADD CONSTRAINT {{= it.defKey}}_constraint_name PRIMARY KEY ({{~indexFields:field:i}}{{= field.defKey }}{{= i < indexFields.length-1 ? ',' : '' }}{{~}}) DISABLE NOVALIDATE;\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nALTER TABLE {{= tableKey }} SET TBLPROPERTIES ('comment' = '{{=it.func.strJoin(defName, intro, \";\", true)}}');\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'CHAR') {\n return `${dbDataType} (${dataLen ? dataLen : '128'})`; \n } else if(dbDataType.toUpperCase() === 'DECIMAL' ) {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMNS ({{= field.defKey}} {{= finalDataType}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}});\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'CHAR') {\n return `${dbDataType} (${dataLen ? dataLen : '128'})`; \n } else if(dbDataType.toUpperCase() === 'DECIMAL' ) {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\nALTER TABLE {{= tableKey }} CHANGE {{= preDefKey || field.defKey}} {{= nextDefKey || field.defKey}} {{= finalDataType}} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{~}}", + "columnDelete": null, + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}}{{?}} INDEX {{=row.defKey}} ON TABLE {{= tableKey }} (\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}} {{= idx < row.fields.length - 1 ? ',' : ''}}\r\n {{~}}\r\n) AS 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler'\r\nWITH DEFERRED REBUILD {{? row.defName || row.intro }} COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}'{{?}};\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nDROP INDEX IF EXISTS {{=row.defKey}} ON {{= tableKey }};\n{{? row.fields.length > 0 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON TABLE {{= tableKey }} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}} {{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n) AS 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler'\nWITH DEFERRED REBUILD {{? row.defName || row.intro }} COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}' {{?}};\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nDROP INDEX IF EXISTS {{=row.defKey}} ON {{= tableKey }};\n{{~}}", + "metaTableQuery": "SELECT\r\n tbl.\"TBL_NAME\" AS def_key -- 表名\r\n ,tbl_params.\"PARAM_VALUE\" AS def_name -- 表注释\r\n ,db.\"NAME\" AS schema_name -- 数据库名\r\nFROM\r\n \"SDS\" SDS\r\n LEFT JOIN \"TBLS\" tbl ON sds.\"SD_ID\" = tbl.\"SD_ID\"\r\n LEFT JOIN \"TABLE_PARAMS\" tbl_params ON tbl.\"TBL_ID\" = tbl_params.\"TBL_ID\" AND tbl_params.\"PARAM_KEY\" = 'comment'\r\n LEFT JOIN \"PARTITION_KEYS\" partkey ON tbl.\"TBL_ID\" = partkey.\"TBL_ID\"\r\n LEFT JOIN \"DBS\" db ON tbl.\"DB_ID\" = db.\"DB_ID\" -- 过滤数据库\r\nWHERE\r\n tbl.\"TBL_NAME\" IS NOT NULL\r\n AND db.\"NAME\" IN (:schemaName)\r\n AND tbl.\"TBL_TYPE\" = 'MANAGED_TABLE'-- 只查询MANAGED_TABLE类型的表", + "metaColumnQuery": "SELECT\r\n tbl.\"TBL_NAME\" AS tbl_def_key -- 表名\r\n ,tbl_params.\"PARAM_VALUE\" AS tbl_comment -- 表注释\r\n ,col.\"COLUMN_NAME\" AS def_key -- 字段名称\r\n ,col.\"COMMENT\" AS def_name -- 字段注释\r\n ,col.\"TYPE_NAME\" AS db_data_type -- 字段类型\r\n ,db.\"NAME\" AS schema_name\r\nFROM\r\n \"SDS\" sds\r\n LEFT JOIN \"TBLS\" tbl ON sds.\"SD_ID\" = tbl.\"SD_ID\"\r\n LEFT JOIN \"TABLE_PARAMS\" tbl_params ON tbl.\"TBL_ID\" = tbl_params.\"TBL_ID\" AND tbl_params.\"PARAM_KEY\" = 'comment'\r\n LEFT JOIN \"PARTITION_KEYS\" partkey ON tbl.\"TBL_ID\" = partkey.\"TBL_ID\"\r\n LEFT JOIN \"DBS\" db ON tbl.\"DB_ID\" = db.\"DB_ID\"\r\n LEFT JOIN \"COLUMNS_V2\" col ON sds.\"CD_ID\" = col.\"CD_ID\" -- 过滤数据库\r\nWHERE\r\n tbl.\"TBL_NAME\" IS NOT NULL\r\n AND db.\"NAME\" IN (:schemaName)\r\n AND CONCAT(TRIM(db.\"NAME\"), '.', TRIM(tbl.\"TBL_NAME\")) IN (:sysTableNames)\r\nORDER BY schema_name ASC, tbl_def_key ASC", + "metaIndexQuery": "SELECT\n tbl.\"TBL_NAME\" AS TBL_DEF_KEY\n ,sort.\"COLUMN_NAME\" AS COL_DEF_KEY\n , i.\"INDEX_NAME\" AS DEF_KEY\n , params.\"PARAM_VALUE\" AS DEF_NAME\n , '' AS INTRO\n , '' AS SORT_TYPE\n , '' AS TYPE\n , sort.\"INTEGER_IDX\" AS ORDER_VALUE\n , db.\"NAME\" AS SCHEMA_NAME\nFROM\n \"SDS\" SDS\n LEFT JOIN \"TBLS\" tbl ON sds.\"SD_ID\" = tbl.\"SD_ID\"\n LEFT JOIN \"DBS\" db ON tbl.\"DB_ID\" = db.\"DB_ID\" -- 过滤数据库\n INNER JOIN \"IDXS\" i ON tbl.\"TBL_ID\" = i.\"ORIG_TBL_ID\"\n INNER JOIN \"SORT_COLS\" sort ON i.\"SD_ID\" = sort.\"SD_ID\"\n INNER JOIN \"INDEX_PARAMS\" params ON i.\"INDEX_ID\" = params.\"INDEX_ID\" and params.\"PARAM_KEY\" = 'comment'\nWHERE\n tbl.\"TBL_NAME\" IS NOT NULL\n AND db.\"NAME\" IN (:schemaName)\n AND CONCAT(TRIM(db.\"NAME\"), '.', TRIM(tbl.\"TBL_NAME\")) IN (:sysTableNames)\nORDER BY SCHEMA_NAME, TBL_DEF_KEY, DEF_KEY, ORDER_VALUE ;", + "metaQueryCharset": null, + "orderValue": 16, + "isEnabled": 0, + "id": "BPMCJTYLY4UAC" + }, + { + "defKey": "Doris", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "mysql-connector-j-8.3.0.jar", + "jdbcReferDriver": "com.mysql.cj.jdbc.Driver", + "jdbcReferUrl": "jdbc:mysql://[ip]:[port]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return ''\r\n }\r\n const dataType = dbDataType.toUpperCase();\r\n if (dataType === 'VARCHAR') {\r\n return `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n } else if (['JSON','DATE'].includes(dataType)) {\r\n return dataType;\r\n } else if (dataType === 'TIMESTAMP') {\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 9 ? `${dataType}(${field.dataLen})` : dataType;\r\n } else if (dataType === 'DECIMAL') {\r\n return field.dataLen && field.dataLen >= 0 && field.dataLen <= 6 ? `${dataType}(${field.dataLen})` : dataType;\r\n } else {\r\n return field.dataLen && field.dataLen >= 0 ? `${dataType}(${field.dataLen})` : dataType;\r\n }\r\n }\r\n\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const notNull = field.notNull ? ' NOT NULL' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n const comment = ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n return `${dataType}${notNull}${defaultValue}${comment}${index < nonPkList.length-1 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; nonPkList = [] ; }}\r\n{{~it.fields:field:index}}{{? field.primaryKey }}{{ pkList.push(field) }}{{??}}{{ nonPkList.push(field) }}{{?}}{{~}}\r\n{{~pkList:field:index}}\r\n `{{=field.defKey}}` {{= getFieldDefinition(field, index, it.fields) }}{{?}}\r\n{{~nonPkList:field:index}}\r\n `{{=field.defKey}}` {{= getFieldDefinition(field, index, it.fields) }}{{?}}\r\n{{~}}\r\n){{? pkList.length > 0 }} UNIQUE KEY ({{~pkList:field:index}}`{{= field.defKey }}`{{= index < pkList.length-1 ? ',' : '' }}{{~}}){{?}}\r\n{{? it.defName || it.intro }} \r\n COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}' \r\n{{?}}\r\n DISTRIBUTED BY HASH(`{{=pkList.length > 0 ? pkList[0].defKey : it.fields[0].defKey}}`) BUCKETS 1\r\n PROPERTIES(\r\n \"replication_allocation\" = \"tag.location.default: 1\"\r\n );\r\n$blankline\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nALTER TABLE {{= tableKey }} MODIFY COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'BIGINT') {\n return `${dbDataType} ${dataLen ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'JSON') {\n return dbDataType; \n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DATETIME') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 9) ? `(${dataLen})` : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n \n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey}} {{= finalDataType}}{{= field.autoIncrement ? ' AUTO_INCREMENT ' : '' }}{{? field.notNull}} NOT NULL {{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'VARCHAR' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'BIGINT') {\n return `${dbDataType} ${dataLen ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'JSON') {\n return dbDataType; \n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DATETIME') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n } else if(dbDataType.toUpperCase() === 'TIMESTAMP') {\n return `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 9) ? `(${dataLen})` : ''}`;\n } else if(dataLen && dataLen >= 0) {\n return `${dbDataType} (${dataLen})`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{ \n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey')}}\nALTER TABLE {{= tableKey }} RENAME COLUMN {{=preDefKey}} {{=field.defKey}};;\n{{?}}\n{{? updateKeys.includes('defaultValue')}}\nALTER TABLE {{= tableKey }} ALTER COLUMN `{{=field.defKey}}` SET DEFAULT {{=field.defaultValue}};\n{{?}}\nALTER TABLE {{= tableKey }} MODIFY COLUMN `{{=field.defKey}}` {{=finalDataType}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT ' : '' }}{{? field.defaultValue }} DEFAULT {{=field.defaultValue}}{{?}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\n{{~}}\n", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields && row.fields.length === 1 && row.defKey}}\r\nALTER TABLE {{= tableKey }} ADD INDEX {{=row.defKey}} ({{~row.fields:field:idx}} {{=field.fieldDefKey}} {{~}}) {{? row.defName || row.intro }} COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}'{{?}};\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n let updateKeys = row.baseUpdate.updateKeys.split(',');\n let preDefKey = row.baseUpdate.pre.defKey;\n}}\nALTER TABLE {{=it.defKey}}\nDROP INDEX {{= schemaName }}{{? updateKeys.includes('defKey')}}{{=preDefKey}}{{??}}{{=row.defKey}}{{?}}, \nADD {{? row.type.toUpperCase() === 'UNIQUE'}} {{=row.type}} {{?}} INDEX {{= schemaName }}{{=row.defKey}}(\n {{~row.fields:field:idx}}\n `{{=field.fieldDefKey}}` {{=field.sortType}}{{= idx < row.fields.length - 1 ? ',' : ''}}\n {{~}}\n){{? row.defName || row.intro }}COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}'{{?}};\n{{~}}", + "indexDelete": "{{\r\n let indexesUpdate = it.indexesUpdate; \r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~indexesUpdate:index:i}}\r\nDROP INDEX {{=index.defKey}} ON {{= tableKey }};\r\n{{~}}", + "metaTableQuery": "SELECT\n null AS id,\n table_name AS def_key,\n table_comment AS def_name,\n table_schema AS schema_name\nFROM\n information_schema.tables\nWHERE table_type = 'BASE TABLE'\n and table_schema IN (:schemaName)", + "metaColumnQuery": "SELECT\n table_schema AS schema_name,\n table_name AS tbl_def_key,\n ordinal_position as order_value,\n column_name AS def_key,\n column_comment AS def_name,\n '' AS intro,\n data_type AS db_data_type,\n IF(data_type = column_type,NULL,COALESCE ( character_maximum_length, numeric_precision )) AS data_len,\n IF(data_type = column_type, NULL, numeric_scale ) AS num_scale,\n IF(column_key = 'PRI', 1, 0 ) AS primary_key,\n IF(is_nullable = 'YES', 0, 1 ) AS not_null,\n IF(extra = 'AUTO_INCREMENT', 1, 0 ) AS auto_increment,\n column_default AS default_value\nFROM\n information_schema.COLUMNS\nWHERE\n table_schema IN (:schemaName)\n and CONCAT(table_schema, '.', table_name) in (:sysTableNames)\nORDER BY\n table_schema ASC,\n table_name ASC,\n ordinal_position ASC", + "metaIndexQuery": "SELECT TABLE_NAME AS TBL_DEF_KEY,\r\n COLUMN_NAME AS COL_DEF_KEY,\r\n INDEX_COMMENT AS DEF_NAME,\r\n COMMENT AS INTRO,\r\n IF (COLLATION = 'A', 'ASC', 'DESC') AS SORT_TYPE,\r\n IF (NON_UNIQUE = 1, 'NORMAL', 'UNIQUE') AS TYPE,\r\n SEQ_IN_INDEX AS ORDER_VALUE,\r\n INDEX_NAME AS DEF_KEY FROM information_schema.STATISTICS\r\nWHERE INDEX_SCHEMA IN (:schemaName) AND CONCAT(TRIM(INDEX_SCHEMA), '.', TRIM(TABLE_NAME)) IN (:sysTableNames) AND INDEX_NAME != 'PRIMARY'\r\nORDER BY TBL_DEF_KEY, DEF_KEY, ORDER_VALUE", + "metaQueryCharset": null, + "orderValue": 17, + "isEnabled": 0, + "id": "BPQHE5O6A64AC" + }, + { + "defKey": "StarRocks", + "defName": null, + "icon": "", + "driverFiles": "mysql-connector-j-8.3.0.jar", + "jdbcReferDriver": "com.mysql.jdbc.Driver", + "jdbcReferUrl": "jdbc:mysql://[ip]:[port]/[dbname]?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n const dataType = dbDataType.toUpperCase();\r\n if (dataType === 'VARCHAR') {\r\n return `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n } else if (['DATE','STRING','FLOAT','BOOLEAN','DOUBLE','JSON','DATETIME'].includes(dataType)) {\r\n return dataType;\r\n } else if (dataType === 'DECIMAL') {\r\n if (field.dataLen) {\r\n if(field.dataLen>=1 && field.dataLen<=38) {\r\n return `${dataType}(${field.dataLen},${field.numScale ? field.numScale : 0})`;\r\n }\r\n else {\r\n return dataType;\r\n }\r\n }\r\n } else if(['BIGINT','INT','CHAR','SMALLINT','VARBINARY','BINARY'].includes(dataType)) {\r\n return field.dataLen ? `${dataType}(${field.dataLen})` : dataType;\r\n } else {\r\n return field.dataLen ? `${dataType}(${field.dataLen})` : dataType;\r\n }\r\n }\r\n\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const notNull = field.notNull ? ' NOT NULL' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n const comment = ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n return `${dataType}${notNull}${defaultValue}${comment}${index < nonPkList.length-1 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; nonPkList = [] ; }}\r\n{{~it.fields:field:index}}{{? field.primaryKey }}{{ pkList.push(field) }}{{??}}{{ nonPkList.push(field) }}{{?}}{{~}}\r\n{{~pkList:field:index}}\r\n `{{=field.defKey}}` {{= getFieldDefinition(field, index, it.fields) }}{{?}}\r\n{{~nonPkList:field:index}}\r\n `{{=field.defKey}}` {{= getFieldDefinition(field, index, it.fields) }}{{?}}\r\n{{~}}\r\n){{? pkList.length > 0 }} PRIMARY KEY ({{~pkList:field:index}}`{{= field.defKey }}`{{= index < pkList.length-1 ? ',' : '' }}{{~}}){{?}}{{?\r\nit.defName || it.intro }} COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}'{{?}};\r\n\r\n$blankline\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD CONSTRAINT constraint_name PRIMARY KEY({{~indexFields:field:i}}{{= field.defKey }} {{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON TABLE {{= tableKey }} IS '{{=it.func.strJoin(defName, intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'CHAR' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'VARBINARY' ||\n dbDataType.toUpperCase() === 'BINARY') {\n return `${dbDataType} ${(dataLen && dataLen > 0) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'VARCHAR') {\n return `${dbDataType} (${(dataLen && dataLen > 0) ? dataLen : 128})`;\n } else if(dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'STRING' ||\n dbDataType.toUpperCase() === 'FLOAT' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'DOUBLE' ||\n dbDataType.toUpperCase() === 'JSON') {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey}} {{= finalDataType}}{{? field.notNull}} NOT NULL {{?}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'BIGINT' ||\n dbDataType.toUpperCase() === 'CHAR' ||\n dbDataType.toUpperCase() === 'INT' ||\n dbDataType.toUpperCase() === 'SMALLINT' ||\n dbDataType.toUpperCase() === 'VARBINARY' ||\n dbDataType.toUpperCase() === 'BINARY') {\n return `${dbDataType} ${(dataLen && dataLen > 0) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'VARCHAR') {\n return `${dbDataType} (${(dataLen && dataLen > 0) ? dataLen : 128})`;\n } else if(dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'STRING' ||\n dbDataType.toUpperCase() === 'FLOAT' ||\n dbDataType.toUpperCase() === 'DATETIME' ||\n dbDataType.toUpperCase() === 'BOOLEAN' ||\n dbDataType.toUpperCase() === 'DOUBLE' ||\n dbDataType.toUpperCase() === 'JSON') {\n return dbDataType;\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey }} TO {{= field.defKey }};{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'defName' || item === 'intro') }}\nALTER TABLE {{= tableKey }} MODIFY COLUMN {{= field.defKey }} {{= finalDataType}} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length && row.fields.length === 1 && row.defKey}}\r\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }} (\r\n {{~row.fields:field:idx}} {{=field.fieldDefKey}} {{= idx < row.fields.length - 1 ? ',' : ''}} {{~}}\r\n) {{? row.defName || row.intro }} COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}' {{?}};\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nALTER TABLE {{= it.defKey}} DROP INDEX {{? preDefKey}} {{= preDefKey}}{{??}} {{=row.defKey}}{{?}};\n{{? row.fields.length && row.fields.length === 1 && row.defKey}}\nCREATE {{? row.type.toUpperCase() === 'UNIQUE'}}{{=row.type}}{{?}} INDEX {{=row.defKey}} ON {{= tableKey }}(\n {{~row.fields:field:idx}} {{=field.fieldDefKey}} {{= idx < row.fields.length - 1 ? ',' : ''}}{{~}}\n){{? row.defName || row.intro }} COMMENT '{{=it.func.strJoin(row.defName, row.intro, \";\", true)}}'{{?}};\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nALTER TABLE {{= tableKey }} DROP INDEX {{=row.defKey}};\n{{~}}", + "metaTableQuery": "SELECT\n null AS id,\n table_name AS def_key,\n table_comment AS def_name,\n table_schema AS schema_name\nFROM\n information_schema.tables\nWHERE table_type = 'BASE TABLE'\n and table_schema IN (:schemaName)", + "metaColumnQuery": "SELECT\n table_schema AS schema_name,\n table_name AS tbl_def_key,\n ordinal_position as order_value,\n column_name AS def_key,\n column_comment AS def_name,\n '' AS intro,\n data_type AS db_data_type,\n IF(data_type = column_type,NULL,COALESCE ( character_maximum_length, numeric_precision )) AS data_len,\n IF(data_type = column_type, NULL, numeric_scale ) AS num_scale,\n IF(column_key = 'PRI', 1, 0 ) AS primary_key,\n IF(is_nullable = 'YES', 0, 1 ) AS not_null,\n IF(extra = 'AUTO_INCREMENT', 1, 0 ) AS auto_increment,\n column_default AS default_value\nFROM\n information_schema.COLUMNS\nWHERE\n table_schema IN (:schemaName)\n and CONCAT(table_schema, '.', table_name) in (:sysTableNames)\nORDER BY\n table_schema ASC,\n table_name ASC,\n ordinal_position ASC", + "metaIndexQuery": "SELECT INDEX_SCHEMA AS SCHEMA_NAME,\r\n TABLE_NAME AS TBL_DEF_KEY,\r\n COLUMN_NAME AS COL_DEF_KEY,\r\n INDEX_COMMENT AS DEF_NAME,\r\n COMMENT AS INTRO,\r\n IF (COLLATION = 'A', 'ASC', 'DESC') AS SORT_TYPE,\r\n IF (NON_UNIQUE = 1, 'NORMAL', 'UNIQUE') AS TYPE,\r\n SEQ_IN_INDEX AS ORDER_VALUE,\r\n INDEX_NAME AS DEF_KEY FROM information_schema.STATISTICS\r\nWHERE INDEX_SCHEMA IN (:schemaName) AND CONCAT(INDEX_SCHEMA, '.', TABLE_NAME) IN (:sysTableNames) AND INDEX_NAME != 'PRIMARY'\r\nORDER BY INDEX_SCHEMA, TBL_DEF_KEY, DEF_KEY, ORDER_VALUE", + "metaQueryCharset": null, + "orderValue": 18, + "isEnabled": 0, + "id": "1KLNTK63RV002" + }, + { + "defKey": "Impala", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "ImpalaJDBC42.jar;postgresql-42.6.0.jar", + "jdbcReferDriver": "com.cloudera.impala.jdbc.Driver", + "jdbcReferUrl": "jdbc:impala://[ip]:[port]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n const dataType = dbDataType.toUpperCase();\r\n if (['VARCHAR','CHAR'].includes(dataType)) {\r\n return `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n } else if (dataType === 'DECIMAL') {\r\n return field.dataLen && field.dataLen >= 1 && field.dataLen <= 38 ? (field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? `${dataType}(${field.dataLen},${field.numScale})` : `${dataType}(${field.dataLen})`) : `${dataType}`;\r\n\r\n } else if (dataType === 'TEXT') {\r\n return dataType;\r\n }else {\r\n return field.dataLen && field.dataLen >= 0 ? `${dataType}(${field.dataLen})` : dataType;\r\n }\r\n }\r\n\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const comment = ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n return `${dataType}${comment}${index < fields.length - 1 || pkList.length > 0 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n `{{=field.defKey}}` {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n){{? (it.intro && it.intro !== '') || (it.defName && it.defName !== '') }} COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}'{{?}};\r\n$blankline\r\nSTORED AS PARQUET TBLPROPERTIES ('transactional'='false');", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nCOMMENT ON TABLE {{= tableKey }} is '{{=it.func.strJoin(defName, intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'CHAR') {\n return `${dbDataType} (${(dataLen && dataLen > 0) ? dataLen : 128})`;\n } else if(dbDataType.toUpperCase() === 'VARCHAR') {\n return `${dbDataType} ${(dataLen && dataLen > 0) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DECIMAL' && dataLen) {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nALTER TABLE {{= tableKey }} ADD COLUMNS ({{~fieldsUpdate:field:index}} \n {{= field.defKey}} {{=computeDatatype(field)}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}}{{= index < fieldsUpdate.length - 1 ? ',' : '' }} \n{{~}});\n", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\n if(!dbDataType) {\n return '';\n }\n if(dbDataType.toUpperCase() === 'CHAR') {\n return `${dbDataType} (${(dataLen && dataLen > 0) ? dataLen : 128})`;\n } else if(dbDataType.toUpperCase() === 'VARCHAR') {\n return `${dbDataType} ${(dataLen && dataLen > 0) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DECIMAL' && dataLen) {\n return `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 38) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\n }\n return dbDataType;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\nALTER TABLE {{= tableKey }} CHANGE COLUMN {{= preDefKey || field.defKey}} {{= nextDefKey || field.defKey}} {{= finalDataType}} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}';\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "", + "indexUpdate": null, + "indexDelete": "", + "metaTableQuery": "SELECT\r\n tbl.\"TBL_NAME\" AS def_key -- 表名\r\n ,tbl_params.\"PARAM_VALUE\" AS def_name -- 表注释\r\n ,db.\"NAME\" AS schema_name -- 数据库名\r\nFROM\r\n \"SDS\" SDS\r\n LEFT JOIN \"TBLS\" tbl ON sds.\"SD_ID\" = tbl.\"SD_ID\"\r\n LEFT JOIN \"TABLE_PARAMS\" tbl_params ON tbl.\"TBL_ID\" = tbl_params.\"TBL_ID\" AND tbl_params.\"PARAM_KEY\" = 'comment'\r\n LEFT JOIN \"PARTITION_KEYS\" partkey ON tbl.\"TBL_ID\" = partkey.\"TBL_ID\"\r\n LEFT JOIN \"DBS\" db ON tbl.\"DB_ID\" = db.\"DB_ID\" -- 过滤数据库\r\nWHERE\r\n tbl.\"TBL_NAME\" IS NOT NULL\r\n AND db.\"NAME\" IN (:schemaName)", + "metaColumnQuery": "SELECT\r\n tbl.\"TBL_NAME\" AS tbl_def_key,\r\n tbl_params.\"PARAM_VALUE\" AS tbl_comment,\r\n col.\"COLUMN_NAME\" AS def_key,\r\n col.\"COMMENT\" AS def_name,\r\n CASE WHEN\r\n POSITION('(' IN col.\"TYPE_NAME\") = 0\r\n THEN 0 ELSE (STRING_TO_ARRAY(SUBSTRING(col.\"TYPE_NAME\", POSITION('(' IN col.\"TYPE_NAME\") + 1, POSITION(')' IN col.\"TYPE_NAME\") - POSITION('(' IN col.\"TYPE_NAME\") - 1), ','))[1]::INTEGER END AS data_len,\r\n CASE WHEN\r\n POSITION('(' IN col.\"TYPE_NAME\") = 0\r\n THEN 0 ELSE (STRING_TO_ARRAY(SUBSTRING(col.\"TYPE_NAME\", POSITION('(' IN col.\"TYPE_NAME\") + 1, POSITION(')' IN col.\"TYPE_NAME\") - POSITION('(' IN col.\"TYPE_NAME\") - 1), ','))[2]::INTEGER END AS num_scale,\r\n SUBSTRING(col.\"TYPE_NAME\", '^[^\\\\(]+') AS db_data_type,\r\n db.\"NAME\" AS schema_name\r\nFROM\r\n \"SDS\" sds\r\n LEFT JOIN \"TBLS\" tbl ON sds.\"SD_ID\" = tbl.\"SD_ID\"\r\n LEFT JOIN \"TABLE_PARAMS\" tbl_params ON tbl.\"TBL_ID\" = tbl_params.\"TBL_ID\" AND tbl_params.\"PARAM_KEY\" = 'comment'\r\n LEFT JOIN \"PARTITION_KEYS\" partkey ON tbl.\"TBL_ID\" = partkey.\"TBL_ID\"\r\n LEFT JOIN \"DBS\" db ON tbl.\"DB_ID\" = db.\"DB_ID\"\r\n LEFT JOIN \"COLUMNS_V2\" col ON sds.\"CD_ID\" = col.\"CD_ID\"\r\nWHERE\r\n tbl.\"TBL_NAME\" IS NOT NULL\r\n AND db.\"NAME\" IN (:schemaName)\r\n AND CONCAT(db.\"NAME\", '.', tbl.\"TBL_NAME\") IN (:sysTableNames)\r\nORDER BY schema_name, ASC, tbl_def_key ASC", + "metaIndexQuery": null, + "metaQueryCharset": null, + "orderValue": 19, + "isEnabled": 0, + "id": "BPQHETM4U64AB" + }, + { + "defKey": "MaxCompute", + "defName": null, + "icon": "\n \n \n \n \n ", + "driverFiles": "odps-jdbc-3.5.8-jar-with-dependencies.jar", + "jdbcReferDriver": "com.aliyun.odps.jdbc.OdpsDriver", + "jdbcReferUrl": "jdbc:odps://[ip]:[port]?project=[database]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n const dataType = dbDataType.toUpperCase();\r\n if (['VARCHAR','CHAR'].includes(dataType)) {\r\n return `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n } else if (dataType === 'DECIMAL') {\r\n return field.dataLen && field.dataLen >= 0 ? `${dataType}(${field.dataLen},${field.numScale ? field.numScale : 0})` : `${dataType}(0, 0)`;\r\n } else if (dataType === 'TEXT') {\r\n return dataType;\r\n }else {\r\n return field.dataLen && field.dataLen >= 0 ? `${dataType}(${field.dataLen})` : dataType;\r\n }\r\n }\r\n\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const notNull = field.notNull ? ' NOT NULL' : '';\r\n const autoIncrement = field.autoIncrement ? ' AUTO_INCREMENT' : '';\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n const comment = ` COMMENT '${it.func.strJoin(field.defName, field.intro, \";\", true)}'`;\r\n return `${dataType}${notNull}${autoIncrement}${defaultValue}${comment}${index < fields.length - 1 || pkList.length > 0 ? ',' : ''}`;\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n{{? pkList.length > 0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i < pkList.length - 1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n){{? (it.intro && it.intro !== '') || (it.defName && it.defName !== '') }} COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}'{{?}};\r\n$blankline\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? isPrimaryKeyModified }}\r\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\r\n{{? indexFields && indexFields.length > 0}}\r\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY({{~indexFields:field:i}}{{= field.defKey }} {{= i < indexFields.length-1 ? ',' : '' }}{{~}});\r\n{{?}}\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nALTER TABLE {{= tableKey }} SET COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}';\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= tableKey }} RENAME TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'CHAR') {\r\n return `${dbDataType} (${dataLen ? dataLen : '128'})`; \r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0) ? ((numScale && numScale >= 0) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\r\n }\r\n return dbDataType;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const finalDataType = computeDatatype(field);\r\n}}\r\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey }} {{= finalDataType}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'\r\n{{?}};\r\n{{~}}\r\n\r\n", + "columnUpdate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'CHAR') {\r\n return `${dbDataType} (${dataLen ? dataLen : '128'})`; \r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType} ${(dataLen && dataLen >= 0) ? ((numScale && numScale >= 0) ? `(${dataLen},${numScale})` : `(${dataLen})` ) : ''}`;\r\n }\r\n return dbDataType;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{\r\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n const finalDataType = computeDatatype(field);\r\n const preDefKey = field?.baseUpdate?.pre?.defKey;\r\n const nextDefKey = field?.baseUpdate?.next?.defKey;\r\n}}\r\n{{? updateKeys.includes('defKey') }}ALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey }} TO {{= field.defKey }};{{?}}\r\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale') }}\r\nALTER TABLE {{= tableKey }} CHANGE {{= field.defKey}} {{= field.defKey}} {{= finalDataType}};\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'notNull') }}\r\nALTER TABLE {{= tableKey }} CHANGE COLUMN {{= field.defKey }} {{? field.notNull }} NOT NULL {{??}} NULL {{?}};\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nALTER TABLE {{= tableKey }} CHANGE COLUMN {{= field.defKey }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'\r\n;\r\n{{?}}\r\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nALTER TABLE {{= tableKey }} DROP COLUMNS ({{~fieldsUpdate:field:index}}{{=field.defKey}}{{= index < fieldsUpdate.length - 1 ? ',' : '' }}{{~}});", + "indexCreate": "", + "indexUpdate": null, + "indexDelete": "", + "metaTableQuery": "SELECT\r\n table_name AS def_key,\r\n table_comment AS def_name,\r\n table_schema AS schema_name\r\nFROM\r\n information_schema.tables\r\nWHERE table_type = 'MANAGED_TABLE'\r\n and table_schema IN (:schemaName)", + "metaColumnQuery": "SELECT\r\n table_schema AS schema_name,\r\n table_name AS tbl_def_key,\r\n ordinal_position as order_value,\r\n column_name AS def_key,\r\n column_comment AS def_name,\r\n '' AS intro,\r\n REGEXP_REPLACE(data_type, '\\\\(.*\\\\)', '') AS db_data_type,\r\n CAST(REGEXP_REPLACE(data_type, '^.*\\\\((.*)[,.].*$', '\\\\1') AS INT) AS data_len,\r\n CAST(REGEXP_REPLACE(data_type, '^.*\\\\(([^,]+),([^)]+)\\\\)$', '\\\\2') AS INT) AS num_scale,\r\n IF(is_nullable, 0, 1),\r\n column_default AS default_value\r\nFROM\r\n information_schema.COLUMNS\r\nWHERE\r\n table_schema IN (:schemaName)\r\n and CONCAT(table_schema, '.', table_name) in (:sysTableNames)\r\nORDER BY\r\n table_schema ASC,\r\n table_name ASC,\r\n ordinal_position ASC", + "metaIndexQuery": null, + "metaQueryCharset": null, + "orderValue": 20, + "isEnabled": 0, + "id": "BPQHEH5Y464AC" + }, + { + "defKey": "ClickHouse", + "defName": null, + "icon": "", + "driverFiles": "clickhouse4j-1.4.4.jar", + "jdbcReferDriver": "cc.blynk.clickhouse.ClickHouseDriver", + "jdbcReferUrl": "jdbc:clickhouse://[host]:[port]", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n\r\n function getDataType(field) {\r\n const { dbDataType } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n let dataType = dbDataType.toUpperCase();\r\n if(['FIXEDSTRING','STRING'].includes(dataType)){\r\n dataType = `${dataType}(${field.dataLen ? field.dataLen : 128})`;\r\n return isNull(field,dataType);\r\n }else if(dataType=='DATETIME64'){\r\n dataType = `${dataType}(${field.dataLen && field.dataLen>=0 && field.dataLen <=9 ? field.dataLen : 0})`;\r\n return isNull(field,dataType);\r\n }else if(dataType=='DECIMAL'){\r\n dataType = `${dataType}(${field.dataLen && field.dataLen>=1 && field.dataLen <=76 ? field.dataLen : 1},${field.numScale && field.numScale >= 0 && field.numScale <= field.dataLen ? field.numScale :0})`;\r\n return isNull(field,dataType);\r\n }else if(['UNIT16','UNIT32','UNIT64'].includes(dataType)){\r\n return dataType;\r\n }\r\n else{\r\n return isNull(field,dataType);\r\n }\r\n\r\n}\r\n function getFieldDefinition(field, index, fields) {\r\n const dataType = getDataType(field);\r\n const defaultValue = field.defaultValue ? ` DEFAULT ${field.defaultValue}` : '';\r\n return `${dataType}${defaultValue}${index < it.fields.length - 1 ? ',' : '' }`;\r\n }\r\n function isNull(field,dataType) {\r\n if (field.notNull===1) {\r\n return dataType;\r\n }else {\r\n return `Nullable(${dataType})`;\r\n }\r\n }\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE {{= tableKey }}(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{= getFieldDefinition(field, index, it.fields) }}\r\n{{~}}\r\n){{? pkList.length > 0 }} ENGINE = MergeTree() PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i < pkList.length - 1 ? ',' : '' }}{{~}}){{??}} ENGINE = Memory {{?}}{{? it.defName || it.intro }} COMMENT '{{=it.func.strJoin(it.defName, it.intro, \";\", true)}}'{{?}};\r\n$blankline\r\n", + "tableUpdate": "{{\r\n let defKey = it.baseUpdate.next.defKey;\r\n let defName = it.baseUpdate.next.defName;\r\n let intro = it.baseUpdate.next.intro;\r\n let indexFields = it.indexFields;\r\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\r\n}}\r\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}\r\nALTER TABLE {{= tableKey }} MODIFY COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\r\n{{? updateKeys.some((item) => item === 'defKey') }}RENAME TABLE {{= tableKey }} TO {{=defKey}};{{?}}\r\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement, notNull } = field;\n if(!dbDataType) {\n return '';\n }\n let tempDataType = dbDataType;\n if(dbDataType.toUpperCase().startsWith('INT') ||\n dbDataType.toUpperCase().startsWith('UINT') || \n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME') {\n tempDataType = dbDataType;\n } else if(dbDataType.toUpperCase() === 'FIXEDSTRING' ||\n dbDataType.toUpperCase() === 'STRING') {\n tempDataType = `${dbDataType} (${dataLen ? dataLen : 128})`;\n } else if(dbDataType.toUpperCase() === 'DATETIME64') {\n tempDataType = `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 9) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n tempDataType = `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 76) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen}, 0)` ) : '(1, 0)'}`;\n }\n return notNull ? tempDataType : `Nullable(${tempDataType})`;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const finalDataType = computeDatatype(field);\n}}\nALTER TABLE {{= tableKey }} ADD COLUMN {{= field.defKey}} {{= finalDataType}}{{? field.defaultValue}} DEFAULT {{= field.defaultValue}}{{?}}{{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\n{{~}}", + "columnUpdate": "{{\n let fieldsUpdate = it.fieldsUpdate;\n const computeDatatype = (field) => {\n const { dbDataType, dataLen, numScale, defaultValue, autoIncrement, notNull } = field;\n if(!dbDataType) {\n return '';\n }\n let tempDataType = dbDataType;\n if(dbDataType.toUpperCase().startsWith('INT') ||\n dbDataType.toUpperCase().startsWith('UINT') || \n dbDataType.toUpperCase() === 'DATE' ||\n dbDataType.toUpperCase() === 'DATETIME') {\n tempDataType = dbDataType;\n } else if(dbDataType.toUpperCase() === 'FIXEDSTRING' ||\n dbDataType.toUpperCase() === 'STRING') {\n tempDataType = `${dbDataType} (${dataLen ? dataLen : 128})`;\n } else if(dbDataType.toUpperCase() === 'DATETIME64') {\n tempDataType = `${dbDataType} ${(dataLen && dataLen >= 0 && dataLen <= 9) ? `(${dataLen})` : ''}`;\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\n tempDataType = `${dbDataType} ${(dataLen && dataLen >= 1 && dataLen <= 76) ? ((numScale && numScale >= 0 && numScale <= dataLen) ? `(${dataLen},${numScale})` : `(${dataLen}, 0)` ) : '(1, 0)'}`;\n }\n return notNull ? tempDataType : `Nullable(${tempDataType})`;\n };\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\n{{\n const updateKeys = field?.baseUpdate?.updateKeys?.split(\",\") || [];\n const finalDataType = computeDatatype(field);\n const preDefKey = field?.baseUpdate?.pre?.defKey;\n const nextDefKey = field?.baseUpdate?.next?.defKey;\n}}\n{{? updateKeys.includes('defKey') }}\nALTER TABLE {{= tableKey }} RENAME COLUMN {{= preDefKey }} TO {{= field.defKey }};\n{{?}}\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'notNull' || item === 'defaultValue' || item === 'defName' || item === 'intro') }}\nALTER TABLE {{= tableKey }} MODIFY COLUMN {{= field.defKey }} {{= finalDataType}} {{? updateKeys.includes('defaultValue') }} {{? field.defaultValue }} DEFAULT {{= field.defaultValue}}{{?}}{{?}} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'\n{{?}}\n{{~}}", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~it.indexes:row:index}}\r\n{{? row.fields.length > 0 && row.defKey}}\r\nALTER TABLE {{= tableKey }}\r\nADD INDEX {{=row.defKey}}(\r\n {{~row.fields:field:idx}}\r\n {{=field.fieldDefKey}}{{= idx < row.fields.length - 1 ? ', ' : ''}}\r\n {{~}}\r\n) TYPE minmax GRANULARITY 1;\r\n{{?}}\r\n{{~}}\r\n", + "indexUpdate": "{{ \n let indexesUpdate = it.indexesUpdate;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:index}}\n{{\n const updateKeys = row?.baseUpdate?.updateKeys?.split(\",\") || [];\n const fieldsUpdate = row.fieldsUpdate || [];\n const preDefKey = row?.baseUpdate?.pre?.defKey;\n \n}}\n{{? updateKeys.some((item) => item === 'defKey' || item === 'type') || fieldsUpdate.length > 0 }}\nALTER TABLE {{= tableKey }} DROP INDEX {{? preDefKey}} {{= preDefKey}} {{??}} {{=row.defKey}} {{?}};\n{{? row.fields.length > 0 && row.defKey}}\nALTER TABLE {{= tableKey }}\nADD INDEX {{=row.defKey}} (\n {{~row.fields:field:idx}}\n {{=field.fieldDefKey}}{{= idx < row.fields.length - 1 ? ', ' : ''}}\n {{~}}\n) TYPE minmax GRANULARITY 1;\n{{?}}\n{{?}}\n{{~}}", + "indexDelete": "{{\n let indexesUpdate = it.indexesUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~indexesUpdate:row:i}}\nALTER TABLE {{= tableKey }} DROP INDEX {{=row.defKey}};\n{{~}}\n", + "metaTableQuery": "select t.name AS def_key,\r\n t.comment AS def_name,\r\n t.database AS schema_name\r\nfrom system.tables t\r\nWHERE t.database IN (:schemaName) and (t.engine = 'Memory' or t.engine = 'MergeTree')", + "metaColumnQuery": "select distinct c.name as def_Key,\r\n c.table as tbl_def_key,\r\n c.comment as def_name,\r\n c.position as order_value,\r\n c.default_expression as default_value,\r\n c.is_in_primary_key as primary_key,\r\n c.numeric_precision as data_len,\r\n c.numeric_scale as num_scale,\r\n if (c.type LIKE '%Nullable%', replaceRegexpAll(replaceRegexpAll(c.type, 'Nullable\\\\(([^)]+)\\\\)', '\\\\1'), '\\\\(.*\\\\)', '') , replaceRegexpAll(c.type, '\\\\(.*\\\\)', '') ) as db_data_type,\r\n if (c.type LIKE '%Nullable%', 0, 1) as not_null,\r\n c.database AS schema_name\r\nfrom system.columns c\r\n left join system.tables t on c.database = t.database\r\nWHERE c.database in (:schemaName)\r\nAND CONCAT(c.database, '.', c.table) in (:sysTableNames)\r\nORDER BY c.database, c.table;", + "metaIndexQuery": "select\r\n c.table as TBL_DEF_KEY,\r\n c.name as COL_DEF_KEY,\r\n i.name as DEF_KEY,\r\n '' as DEF_NAME,\r\n '' as INTRO,\r\n '' as SORT_TYPE,\r\n '' as TYPE,\r\n c.database as schema_name\r\nfrom system.data_skipping_indices i\r\nleft join system.columns c on i.table = c.table and i.database = c.database\r\nwhere\r\n c.database in (:schemaName)\r\n and CONCAT(c.database, '.', c.table) in (:sysTableNames)\r\n and has(arrayMap(x -> trim(x), splitByChar(',', i.expr)), c.name) = 1\r\norder by c.database, TBL_DEF_KEY, DEF_KEY;", + "metaQueryCharset": null, + "orderValue": 21, + "isEnabled": 0, + "id": "1K6TW6TCR1802" + }, + { + "defKey": "Inceptor", + "defName": null, + "icon": "", + "driverFiles": "quark-driver-8.37.3.jar", + "jdbcReferDriver": "io.transwarp.jdbc.InceptorDriver", + "jdbcReferUrl": "jdbc:transwarp2://:/;", + "tableCreate": "{{\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n function formatDataType(field){\r\n let dataType = field.dbDataType;\r\n let mustLenPattern = new RegExp('CHAR|DECIMAL|NUMERIC|DOUBLE|BINARY','i');\r\n let mustScalePattern = new RegExp('DECIMAL|NUMERIC|DOUBLE','i');\r\n let fmtDataType = '';\r\n if(mustLenPattern.test(dataType)){\r\n let dtLen = field.dataLen||128;\r\n if(mustScalePattern.test(dataType)){\r\n let dtScale = field.numScale;\r\n fmtDataType = `${dataType}(${dtLen},${dtScale})`;\r\n }else{\r\n fmtDataType = `${dataType}(${dtLen})`;\r\n }\r\n }else{\r\n fmtDataType = dataType;\r\n }\r\n return fmtDataType;\r\n };\r\n function formatComment(defName,intro){\r\n return ` COMMENT '${it.func.strJoin(defName, intro, \";\", true)}'`;\r\n };\r\n}}\r\nDROP TABLE IF EXISTS {{= tableKey }};\r\n\r\nCREATE TABLE `{{= tableKey }}`(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{\r\n if(field.primaryKey){\r\n pkList.push(field)\r\n }\r\n let fmtDataType = formatDataType(field);\r\n\r\n }}\r\n `{{=field.defKey}}` {{=fmtDataType}}{{= field.notNull ? ' NOT NULL' : '' }}{{? field.defaultValue }} DEFAULT {{=field.defaultValue}} {{?}}{{=formatComment(field.defName,field.intro)}}{{= index < it.fields.length-1 ? ',' : ( pkList.length > 0 ? ',' : '' ) }}\r\n{{~}}\r\n{{? pkList.length > 0 }}\r\n PRIMARY KEY ({{~pkList:field:i}}`{{= field.defKey }}`{{= i < pkList.length-1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n){{=formatComment(it.defName,it.intro)}};", + "tableUpdate": "{{\n let defKey = it.baseUpdate.next.defKey||'';\n let defName = it.baseUpdate.next.defName||'';\n let intro = it.baseUpdate.next.intro;\n let indexFields = it.indexFields;\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\n}}\n{{? isPrimaryKeyModified }}\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\n{{? indexFields && indexFields.length > 0}}\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}`{{= field.defKey }}`{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\n{{?}}\n{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}ALTER TABLE {{= tableKey }} COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= schemaName }}{{=it.defKey}} RENAME TO {{= schemaName }}{{=defKey}}; {{?}}\n", + "tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};", + "columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, dbDataType, primaryKey } = field;\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON')) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return `DEFAULT \"${defaultValue}\"`;\r\n } else {\r\n return `DEFAULT ${defaultValue}`;\r\n }\r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{= tableKey }} ADD COLUMN `{{=field.defKey}}` {{=computeDatatype(field)}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= computeDefaultValue(field)}} {{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\r\n{{~}}\r\n", + "columnUpdate": "{{ \r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, primaryKey } = field;\r\n const dbDataType = field.dbDataType ? field.dbDataType : '';\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON')) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return `DEFAULT \"${defaultValue}\"`;\r\n } else {\r\n return `DEFAULT ${defaultValue}`;\r\n }\r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\n{{ \r\n let nextPrimaryKey = field.baseUpdate.next.primaryKey;\r\n let prePrimaryKey = field.baseUpdate.pre.primaryKey;\r\n let preDefKey = field.baseUpdate.pre.defKey;\r\n let updateKeys = field.baseUpdate.updateKeys.split(',');\r\n}}\r\n{{? updateKeys.includes('primaryKey') && updateKeys.includes('defaultValue')}}\r\nALTER TABLE {{= tableKey }} ALTER COLUMN `{{=field.defKey}}` SET DEFAULT {{=field.defaultValue}};\r\n{{?}}\r\n{{? updateKeys.some((item) => item === 'dbDataType' || item === 'dataLen' || item === 'numScale' || item === 'intro' || item === 'defName' || item === 'notNull' || item === 'AUTO_INCREMENT') }}\r\nALTER TABLE {{= tableKey }} {{? updateKeys.includes('defKey')}}CHANGE `{{=preDefKey}}` `{{=field.defKey}}` {{??}} MODIFY COLUMN `{{=field.defKey}}` {{?}} {{=computeDatatype(field)}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= computeDefaultValue(field)}} {{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\r\n{{?}}\r\n{{~}}\r\n", + "columnDelete": "{{\n let fieldsUpdate = it.fieldsUpdate; \n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\n{{~fieldsUpdate:field:index}}\nALTER TABLE {{= tableKey }} DROP COLUMN {{=field.defKey}};\n{{~}}", + "indexCreate": "", + "indexUpdate": "", + "indexDelete": "", + "metaTableQuery": "SELECT\n table_id AS id,\n table_name AS def_key,\n commentstring AS def_name,\n database_name AS schema_name\nFROM\n system.tables_v\nWHERE database_name in (:schemaName)", + "metaColumnQuery": "SELECT\n database_name as schema_name,\n table_name AS tbl_def_key,\n column_id as order_value,\n column_name AS def_key,\n commentstring AS def_name,\n '' AS intro,\n column_type,\n split_part(column_type,'(',1) AS db_data_type,\n IF(regexp_like('CHAR,DECIMAL,VARCHAR',upper(split_part(column_type,'(',1))),column_length,NULL) AS data_len,\n IF(regexp_like('CHAR,DECIMAL,VARCHAR',upper(split_part(column_type,'(',1))),decode(column_scale,0,NULL,column_scale),NULL) AS column_scale,\n IF(unique_constraint,1,0) AS primary_key,\n IF(nullable,0,1) AS not_null,\n 0 AS auto_increment,\n default_value AS default_value\nFROM\n system.columns_v\nWHERE\n database_name in (:schemaName)\n and CONCAT(database_name, '.', table_name) in (:sysTableNames)\nORDER BY\n database_name ASC,\n table_name ASC,\n column_id ASC", + "metaIndexQuery": "", + "metaQueryCharset": null, + "orderValue": 22, + "isEnabled": 0, + "id": "1M7S6R68K9H01" + } + ], + "programLangs": [ + { + "defKey": "Java", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 1, + "isEnabled": 1, + "id": "BPP6L7ZLM7EAB", + "codegens": [ + { + "genKey": "MybatisPlus", + "genIntro": "我是MybatisPlus", + "genItems": [ + { + "itemKey": "Entity", + "itemTemplate": "{{\r\nlet base_package = it.genCode.nameSpace && it.genCode.baseName? it.genCode.nameSpace + '.' + it.genCode.baseName : null;\r\nlet entity_name = it.genCode.baseName;\r\nlet fields = it.fields;\r\nlet table_name = it.defKey;\r\nlet table_comment = it.defName;\r\n\r\nlet entity_class = entity_name + 'Entity';\r\nlet mapper_class = entity_name + 'Mapper';\r\nlet service_class = entity_name + 'Service';\r\nlet service_impl_class = entity_name + 'ServiceImpl';\r\nlet controller_class = entity_name + 'Controller';\r\n\r\nlet entity_package = base_package + '.entity';\r\nlet mapper_package = base_package + '.mapper';\r\nlet service_package = base_package + '.service';\r\nlet service_impl_package = base_package + '.service.Impl';\r\nlet controller_package = base_package + 'controller';\r\n\r\nlet entity_instance_name = entity_class.charAt(0).toLowerCase() + entity_class.slice(1);\r\nlet service_instance_name = service_class.charAt(0).toLowerCase() + service_class.slice(1);\r\n\r\nlet import_sentence_list = fields.filter((field, _, __) => {\r\n return field.langDataType === 'BigDecimal' || field.langDataType === 'LocalDateTime' || field.langDataType === 'LocalDate' || field.langDataType === 'LocalTime' || field.langDataType === 'Date'\r\n}).map((field, _, __) => {\r\n if (field.langDataType === 'BigDecimal') {\r\n return 'import java.math.BigDecimal;'\r\n } else if (field.langDataType === 'LocalDateTime') {\r\n return 'import java.time.LocalDateTime;'\r\n } else if (field.langDataType === 'LocalDate') {\r\n return 'import java.time.LocalDate;'\r\n } else if (field.langDataType === 'LocalTime') {\r\n return 'import java.time.LocalTime;'\r\n } else if (field.langDataType === 'Date') {\r\n return 'import java.util.Date;'\r\n } else {\r\n return ''\r\n }\r\n});\r\n}}{{=base_package? 'package ' + base_package + '.pojo.entity;':''}}\r\n$blankline\r\nimport lombok.Getter;\r\nimport lombok.Setter;\r\nimport lombok.experimental.Accessors;\r\nimport com.baomidou.mybatisplus.annotation.*;\r\nimport lombok.ToString;\r\n{{~import_sentence_list:import_sentence:index}}\r\n{{=import_sentence}}\r\n{{~}}\r\n$blankline\r\n/**\r\n * {{=table_comment}}\r\n */\r\n@Getter\r\n@Setter\r\n@ToString\r\n@Accessors(chain = true)\r\n@TableName(\"{{=table_name}}\")\r\npublic class {{=entity_class}} {\r\n$blankline\r\n{{~fields:field:index}}\r\n /**\r\n * {{=field.defName}}{{? field.comment }}; {{=field.comment}}{{?}}\r\n */\r\n {{? field.primaryKey }}\r\n @TableId(type = IdType.ASSIGN_ID)\r\n {{?? it.func.camel(field.defKey,false) === 'creatorId' || it.func.camel(field.defKey,false) === 'createTime'}}\r\n @TableField(fill = FieldFill.INSERT)\r\n {{?? it.func.camel(field.defKey,false) === 'modifierId' || it.func.camel(field.defKey,false) === 'modifyTime'}}\r\n @TableField(fill = FieldFill.INSERT_UPDATE)\r\n {{?? it.func.camel(field.defKey,false) === 'deleted'}}\r\n @TableLogic\r\n {{?}}\r\n private {{=field.dbDataType === 'TINYINT' && field.dataLen === 1 ? 'Boolean' : field.langDataType}} {{=it.func.camel(field.defKey,false)}};\r\n $blankline\r\n{{~}}\r\n}\r\n" + }, + { + "itemKey": "Mapper", + "itemTemplate": "{{\r\nlet base_package = it.genCode.nameSpace + '.' + it.genCode.baseName;\r\nlet entity_name = it.genCode.baseName;\r\nlet fields = it.fields;\r\nlet table_name = it.defKey;\r\nlet table_comment = it.defName;\r\n\r\nlet entity_class = entity_name + 'Entity';\r\nlet mapper_class = entity_name + 'Mapper';\r\nlet service_class = entity_name + 'Service';\r\nlet service_impl_class = entity_name + 'ServiceImpl';\r\nlet controller_class = entity_name + 'Controller';\r\n\r\nlet entity_package = base_package + '.entity';\r\nlet mapper_package = base_package + '.mapper';\r\nlet service_package = base_package + '.service';\r\nlet service_impl_package = base_package + '.service.Impl';\r\nlet controller_package = base_package + 'controller';\r\n\r\nlet entity_instance_name = entity_class.charAt(0).toLowerCase() + entity_class.slice(1);\r\nlet service_instance_name = service_class.charAt(0).toLowerCase() + service_class.slice(1);\r\n\r\nlet import_sentence_list = fields.filter((field, _, __) => {\r\n return field.langDataType === 'BigDecimal' || field.langDataType === 'LocalDateTime' || field.langDataType === 'LocalDate' || field.langDataType === 'LocalTime' || field.langDataType === 'Date'\r\n}).map((field, _, __) => {\r\n if (field.langDataType === 'BigDecimal') {\r\n return 'import java.math.BigDecimal;'\r\n } else if (field.langDataType === 'LocalDateTime') {\r\n return 'import java.time.LocalDateTime;'\r\n } else if (field.langDataType === 'LocalDate') {\r\n return 'import java.time.LocalDate;'\r\n } else if (field.langDataType === 'LocalTime') {\r\n return 'import java.time.LocalTime;'\r\n } else if (field.langDataType === 'Date') {\r\n return 'import java.util.Date;'\r\n } else {\r\n return ''\r\n }\r\n});\r\n}}{{=base_package? 'package ' + base_package + '.mapper;':''}}\r\n$blankline\r\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\r\nimport org.apache.ibatis.annotations.Mapper;\r\n{{=base_package? 'import ' + base_package + '.pojo.entity.' + entity_class + ';': ''}}\r\n$blankline\r\n/**\r\n * {{=table_comment}}\r\n */\r\n@Mapper\r\npublic interface {{=mapper_class}} extends BaseMapper<{{=entity_class}}> {\r\n$blankline\r\n}\r\n$blankline" + }, + { + "itemKey": "Mapper.xml", + "itemTemplate": "{{\r\nlet base_package = it.genCode.nameSpace + '.' + it.genCode.baseName;\r\nlet entity_name = it.genCode.baseName;\r\nlet fields = it.fields;\r\nlet table_name = it.defKey;\r\nlet table_comment = it.defName;\r\n\r\nlet entity_class = entity_name + 'Entity';\r\nlet mapper_class = entity_name + 'Mapper';\r\nlet service_class = entity_name + 'Service';\r\nlet service_impl_class = entity_name + 'ServiceImpl';\r\nlet controller_class = entity_name + 'Controller';\r\n\r\nlet entity_package = base_package + '.entity';\r\nlet mapper_package = base_package + '.mapper';\r\nlet service_package = base_package + '.service';\r\nlet service_impl_package = base_package + '.service.Impl';\r\nlet controller_package = base_package + 'controller';\r\n\r\nlet entity_instance_name = entity_class.charAt(0).toLowerCase() + entity_class.slice(1);\r\nlet service_instance_name = service_class.charAt(0).toLowerCase() + service_class.slice(1);\r\n\r\nlet import_sentence_list = fields.filter((field, _, __) => {\r\n return field.langDataType === 'BigDecimal' || field.langDataType === 'LocalDateTime' || field.langDataType === 'LocalDate' || field.langDataType === 'LocalTime' || field.langDataType === 'Date'\r\n}).map((field, _, __) => {\r\n if (field.langDataType === 'BigDecimal') {\r\n return 'import java.math.BigDecimal;'\r\n } else if (field.langDataType === 'LocalDateTime') {\r\n return 'import java.time.LocalDateTime;'\r\n } else if (field.langDataType === 'LocalDate') {\r\n return 'import java.time.LocalDate;'\r\n } else if (field.langDataType === 'LocalTime') {\r\n return 'import java.time.LocalTime;'\r\n } else if (field.langDataType === 'Date') {\r\n return 'import java.util.Date;'\r\n } else {\r\n return ''\r\n }\r\n});\r\n}}\r\n\r\n$blankline\r\n\r\n\r\n\r\n$blankline\r\n" + }, + { + "itemKey": "Service", + "itemTemplate": "{{\r\nlet base_package = it.genCode.nameSpace + '.' + it.genCode.baseName;\r\nlet entity_name = it.genCode.baseName;\r\nlet fields = it.fields;\r\nlet table_name = it.defKey;\r\nlet table_comment = it.defName;\r\n\r\nlet entity_class = entity_name + 'Entity';\r\nlet mapper_class = entity_name + 'Mapper';\r\nlet service_class = entity_name + 'Service';\r\nlet service_impl_class = entity_name + 'ServiceImpl';\r\nlet controller_class = entity_name + 'Controller';\r\n\r\nlet entity_package = base_package + '.entity';\r\nlet mapper_package = base_package + '.mapper';\r\nlet service_package = base_package + '.service';\r\nlet service_impl_package = base_package + '.service.Impl';\r\nlet controller_package = base_package + 'controller';\r\n\r\nlet entity_instance_name = entity_class.charAt(0).toLowerCase() + entity_class.slice(1);\r\nlet service_instance_name = service_class.charAt(0).toLowerCase() + service_class.slice(1);\r\n\r\nlet import_sentence_list = fields.filter((field, _, __) => {\r\n return field.langDataType === 'BigDecimal' || field.langDataType === 'LocalDateTime' || field.langDataType === 'LocalDate' || field.langDataType === 'LocalTime' || field.langDataType === 'Date'\r\n}).map((field, _, __) => {\r\n if (field.langDataType === 'BigDecimal') {\r\n return 'import java.math.BigDecimal;'\r\n } else if (field.langDataType === 'LocalDateTime') {\r\n return 'import java.time.LocalDateTime;'\r\n } else if (field.langDataType === 'LocalDate') {\r\n return 'import java.time.LocalDate;'\r\n } else if (field.langDataType === 'LocalTime') {\r\n return 'import java.time.LocalTime;'\r\n } else if (field.langDataType === 'Date') {\r\n return 'import java.util.Date;'\r\n } else {\r\n return ''\r\n }\r\n});\r\n}}{{=base_package? 'package ' + base_package + '.service;':''}}\r\n$blankline\r\nimport lombok.extern.slf4j.Slf4j;\r\nimport org.springframework.stereotype.Service;\r\nimport org.springframework.transaction.annotation.Transactional;\r\nimport com.baomidou.mybatisplus.extension.service.IService;\r\nimport com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;\r\nimport com.baomidou.mybatisplus.core.toolkit.Wrappers;\r\nimport com.njzscloud.common.mp.support.PageParam;\r\nimport com.njzscloud.common.mp.support.PageResult;\r\nimport java.util.List;\r\n{{=base_package? 'import ' + base_package + '.pojo.entity.' + entity_class + ';': ''}}\r\n{{=base_package? 'import ' + base_package + '.mapper.' + mapper_class + ';': ''}}\r\n$blankline\r\n/**\r\n * {{=table_comment}}\r\n */\r\n@Slf4j\r\n@Service\r\npublic class {{=service_impl_class}} extends ServiceImpl<{{=mapper_class}}, {{=entity_class}}> implements IService<{{=entity_class}}> {\r\n$blankline\r\n /**\r\n * 新增\r\n */\r\n public void add({{=entity_class}} {{=entity_instance_name}}) {\r\n this.save({{=entity_instance_name}});\r\n }\r\n$blankline\r\n /**\r\n * 修改\r\n */\r\n public void modify({{=entity_class}} {{=entity_instance_name}}) {\r\n this.updateById({{=entity_instance_name}});\r\n }\r\n$blankline\r\n /**\r\n * 删除\r\n */\r\n @Transactional(rollbackFor = Exception.class)\r\n public void del(List ids) {\r\n this.removeBatchByIds(ids);\r\n }\r\n$blankline\r\n /**\r\n * 详情\r\n */\r\n public {{=entity_class}} detail(Long id) {\r\n return this.getById(id);\r\n }\r\n$blankline\r\n /**\r\n * 分页查询\r\n */\r\n public PageResult<{{=entity_class}}> paging(PageParam pageParam, {{=entity_class}} {{=entity_instance_name}}) {\r\n return PageResult.of(this.page(pageParam.toPage(), Wrappers.<{{=entity_class}}>query({{=entity_instance_name}})));\r\n \r\n }\r\n$blankline\r\n}" + }, + { + "itemKey": "Controller", + "itemTemplate": "{{\r\nlet base_package = it.genCode.nameSpace + '.' + it.genCode.baseName;\r\nlet entity_name = it.genCode.baseName;\r\nlet fields = it.fields;\r\nlet table_name = it.defKey;\r\nlet table_comment = it.defName;\r\n\r\nlet entity_class = entity_name + 'Entity';\r\nlet mapper_class = entity_name + 'Mapper';\r\nlet service_class = entity_name + 'Service';\r\nlet service_impl_class = entity_name + 'ServiceImpl';\r\nlet controller_class = entity_name + 'Controller';\r\n\r\nlet entity_package = base_package + '.entity';\r\nlet mapper_package = base_package + '.mapper';\r\nlet service_package = base_package + '.service';\r\nlet service_impl_package = base_package + '.service.Impl';\r\nlet controller_package = base_package + 'controller';\r\n\r\nlet entity_instance_name = entity_class.charAt(0).toLowerCase() + entity_class.slice(1);\r\nlet service_instance_name = service_class.charAt(0).toLowerCase() + service_class.slice(1);\r\n\r\nlet import_sentence_list = fields.filter((field, _, __) => {\r\n return field.langDataType === 'BigDecimal' || field.langDataType === 'LocalDateTime' || field.langDataType === 'LocalDate' || field.langDataType === 'LocalTime' || field.langDataType === 'Date'\r\n}).map((field, _, __) => {\r\n if (field.langDataType === 'BigDecimal') {\r\n return 'import java.math.BigDecimal;'\r\n } else if (field.langDataType === 'LocalDateTime') {\r\n return 'import java.time.LocalDateTime;'\r\n } else if (field.langDataType === 'LocalDate') {\r\n return 'import java.time.LocalDate;'\r\n } else if (field.langDataType === 'LocalTime') {\r\n return 'import java.time.LocalTime;'\r\n } else if (field.langDataType === 'Date') {\r\n return 'import java.util.Date;'\r\n } else {\r\n return ''\r\n }\r\n});\r\n}}{{=base_package? 'package ' + base_package + '.controller;':''}}\r\n$blankline\r\nimport lombok.extern.slf4j.Slf4j;\r\nimport lombok.RequiredArgsConstructor;\r\nimport org.springframework.web.bind.annotation.*;\r\nimport com.njzscloud.common.core.utils.R;\r\nimport com.njzscloud.common.mp.support.PageParam;\r\nimport com.njzscloud.common.mp.support.PageResult;\r\nimport java.util.List;\r\n{{=base_package? 'import ' + base_package + '.pojo.entity.' + entity_class + ';': ''}}\r\n{{=base_package? 'import ' + base_package + '.service.' + service_class + ';': ''}}\r\n$blankline\r\n/**\r\n * {{=table_comment}}\r\n */\r\n@Slf4j\r\n@RestController\r\n@RequestMapping(\"/{{=it.func.underline(table_name)}}\")\r\n@RequiredArgsConstructor\r\npublic class {{=controller_class}} {\r\n$blankline\r\n private final {{=service_class}} {{=service_instance_name}};\r\n$blankline\r\n /**\r\n * 新增\r\n */\r\n @PostMapping(\"/add\")\r\n public R add(@RequestBody {{=entity_class}} {{=entity_instance_name}}) {\r\n {{=service_instance_name}}.add({{=entity_instance_name}});\r\n return R.success();\r\n }\r\n$blankline\r\n /**\r\n * 修改\r\n */\r\n @PostMapping(\"/modify\")\r\n public R modify(@RequestBody {{=entity_class}} {{=entity_instance_name}}) {\r\n {{=service_instance_name}}.modify({{=entity_instance_name}});\r\n return R.success();\r\n }\r\n$blankline\r\n /**\r\n * 删除\r\n */\r\n @PostMapping(\"/del\")\r\n public R del(@RequestBody List ids) {\r\n {{=service_instance_name}}.del(ids);\r\n return R.success();\r\n }\r\n$blankline\r\n /**\r\n * 详情\r\n */\r\n @GetMapping(\"/detail\")\r\n public R<{{=entity_class}}> detail(@RequestParam Long id) {\r\n return R.success({{=service_instance_name}}.detail(id));\r\n }\r\n$blankline\r\n /**\r\n * 分页查询\r\n */\r\n @GetMapping(\"/paging\")\r\n public R> paging(PageParam pageParam, {{=entity_class}} {{=entity_instance_name}}) {\r\n return R.success({{=service_instance_name}}.paging(pageParam, {{=entity_instance_name}}));\r\n\r\n }\r\n$blankline\r\n}" + }, + { + "itemKey": "Enum", + "itemTemplate": "{{let dicts = it.fields\r\n .filter(field => field.dictFrom === 'Manual')\r\n .map(field => {\r\n return {\r\n code: field.stndDictKey,\r\n name: field.defName,\r\n className: it.func.camel(field.stndDictKey, true),\r\n items: field.dictItems.map(item => {\r\n return {\r\n val: item.itemKey,\r\n txt: item.itemName,\r\n memo: item.intro\r\n };\r\n })\r\n };\r\n });\r\n}}{{~ dicts:dict}}import lombok.Getter;\r\nimport lombok.RequiredArgsConstructor;\r\nimport com.njzscloud.common.core.ienum.DictStr;\r\n\r\n/**\r\n * 字典代码:{{=dict.code}}\r\n * 字典名称:{{=dict.name}}\r\n */\r\n@Getter\r\n@RequiredArgsConstructor\r\npublic enum {{=dict.className}} implements DictStr {\r\n{{~ dict.items:item}}\r\n{{? item.memo != null && item.memo.length > 0}}\r\n /**\r\n * {{=item.memo}}\r\n */\r\n{{?}}\r\n {{=item.val}}(\"{{=item.val}}\", \"{{=item.txt}}\"),\r\n $blankline\r\n{{~}}\r\n ;\r\n\r\n private final String val;\r\n$blankline\r\n private final String txt;\r\n}\r\n$blankline\r\n$blankline\r\n{{~}}\r\n" + } + ] + } + ] + }, + { + "defKey": "Rust", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 2, + "isEnabled": 0, + "id": "BPP6MJOD47EAB", + "codegens": [ + { + "genKey": "default", + "genIntro": null, + "genItems": [ + { + "itemKey": "struct", + "itemIntro": null, + "itemTemplate": "use chrono::{DateTime, Local};\nuse serde::{Deserialize, Serialize};\n$blankline\n/// {{=it.defName}}\n#[derive(Serialize, Deserialize, Debug, Clone)]\n{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"langDataType\"];\n return;\n }\n });\n \n var pkgName = 'com.yonsum.pdmaas.xxx';\n var beanClass = it.props?.codeGen?.nameSpace||it.func.camel(it.defKey,true);\n var beanVarName = it.props?.codeGen?.className||beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n \n}}\npub struct {{=beanClass}} {\n {{~it.fields:field:index}}\n {{\n let fieldDateType = field.langDataType;\n if(!field.notNull){\n fieldDateType = 'Option<'+fieldDateType+'>';\n }\n }}/// {{=field.defName}}\n pub {{=it.func.camel(field.defKey,false)}}: {{=fieldDateType}},\n {{~}}\n}\n" + } + ] + } + ] + }, + { + "defKey": "CSharp", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 3, + "isEnabled": 0, + "id": "BPP6MHGXM7EAB", + "codegens": [ + { + "genKey": "default", + "genIntro": null, + "genItems": [ + { + "itemKey": "content", + "itemIntro": null, + "itemTemplate": "using System;\nusing System.Collections.Generic;\n\n$blankline\n{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n}}\n/*\n * @author : http://www.chiner.com.cn\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n * @desc : {{=it.func.join(it.defName,it.comment,'-')}}\n */\nnamespace PDManer.Application\n{\n public partial class {{=it.func.camel(it.defKey,true) }}\n {\n \n {{~it.fields:field:index}}\n /// \n /// {{=it.func.join(field.defName,field.comment,';')}}\n /// \n public {{=field.langDataType}} {{=it.func.camel(field.defKey,true)}} { get; set; }\n $blankline\n {{~}}\n \n }\n}" + } + ] + } + ] + }, + { + "defKey": "GoLang", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 4, + "isEnabled": 0, + "id": "BPP6MIOT47EAC", + "codegens": [ + { + "genKey": "default", + "genIntro": "默认代码生成器", + "genItems": [ + { + "itemKey": "content", + "itemIntro": "我是golang默认的代码生成器", + "itemTemplate": "{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1<10?\"0\"+today.getMonth():today.getMonth();\n var days=today.getDate()<10?\"0\"+today.getDate():today.getDate();\n var hours = today.getHours()<10?\"0\"+today.getHours():today.getHours(); \n\tvar minutes = today.getMinutes()<10?\"0\"+today.getMinutes():today.getMinutes(); \n\tvar seconds = today.getSeconds()<10?\"0\"+today.getSeconds():today.getSeconds(); \n}}\n// Package models {{=it.func.join(it.defName,it.comment,',')}}\n// author : http://www.liyang.love\n// date : {{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n// desc : {{=it.func.join(it.defName,it.comment,',')}}\npackage models\n\n$blankline\n\n// {{=it.func.camel(it.defKey,true) }} {{=it.func.join(it.defName,it.comment,',')}}。\n// 说明:{{=it.comment}}\n// 表名:{{=it.defKey}}\n// group: {{=it.func.camel(it.defKey,true) }}\n// obsolete:\n// appliesto:go 1.8+;\n// namespace:hongmouer.his.models.{{=it.func.camel(it.defKey,true) }}\n// assembly: hongmouer.his.models.go\n// class:HongMouer.HIS.Models.{{=it.func.camel(it.defKey,true) }}\n// version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\ntype {{=it.func.camel(it.defKey,true) }} struct {\n {{~it.fields:field:index}}\n {{=formatGoLang(it.func.camel(field.defKey,true),null,field,it.fields,null,1)}} {{=formatGoLang(field.langDataType,\"langDataType\",field,it.fields,10,3)}} `gorm:\"column:{{=field.primaryKey?\"primaryKey;\":\"\"}}{{=field.defKey}}\" json:\"{{=it.func.camel(field.defKey,true)}}\"` {{=formatGoLang(\"gorm:column:\"+field.defKey+\" json:\"+it.func.camel(field.defKey,true),null,field,it.fields,null,2)}} //type:{{=formatGoLang(field.langDataType,\"langDataType\",field,it.fields,null,3)}} comment:{{=formatGoLang(it.func.join(field.defName,field.comment,';'),\"defName\",field,it.fields,null,4)}} version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n {{~}}\n}\n\n\n$blankline\n// TableName 表名:{{=it.defKey}},{{=it.defName}}。\n// 说明:{{=it.comment}}\nfunc (ZentaoUserInfo) TableName() string {\n\treturn \"{{=it.defKey}}\"\n}\n\n{{\n\nfunction formatGoLang(str, fieldName, field, fileds, emptLength, isFiled) {\n var maxLength = 0;\n\n if (isFiled == 1) {\n for (var i = 0; i < fileds.length; i++) {\n if (getBlength(it.func.camel(fileds[i].defKey, true)) > maxLength) {\n maxLength = getBlength(it.func.camel(fileds[i].defKey, true)) + 2;\n }\n }\n } else if (isFiled == 2) {\n for (var i = 0; i < fileds.length; i++) {\n var newStr = \"gorm:column:\" + fileds[i].defKey + \" json:\" + it.func.camel(fileds[i].defKey, true);\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 2;\n }\n }\n var empt = \"\";\n var strLength = getBlength(str);\n if (field.primaryKey) {\n strLength += getBlength(\"primaryKey;\");\n }\n for (var j = 0; j < maxLength - strLength; j++) {\n empt += ' ';\n }\n return empt;\n } else if (isFiled == 3) {\n /*获取某个字段的最大长度*/\n for (var i = 0; i < fileds.length; i++) {\n var newStr = eval(\"fileds[\" + i + \"].\" + fieldName);\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 1;\n }\n }\n } else if (isFiled == 4) {\n /*获取某个字段的最大长度*/\n for (var i = 0; i < fileds.length; i++) {\n var newStr = fileds[i].comment + \";\" + fileds[i].defName;\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 1;\n }\n }\n }\n else {\n maxLength = emptLength;\n }\n\n var strLength = getBlength(str);\n for (var j = 0; j < maxLength - strLength; j++) {\n str += ' ';\n }\n return str;\n}\n\nfunction getBlength(str) {\n var n = 0;\n for (var i = str.length; i--;) {\n n += str.charCodeAt(i) > 255 ? 2 : 1;\n }\n return n;\n} \n\n}}" + } + ] + } + ] + }, + { + "defKey": "NodeJS", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 5, + "isEnabled": 0, + "id": "BPP6MKTVM7EAB", + "codegens": [ + { + "genKey": "default", + "genIntro": null, + "genItems": [ + { + "itemKey": "content", + "itemIntro": null, + "itemTemplate": "{{\r\n var today=new Date();\r\n var fullYear=today.getFullYear();\r\n var month=today.getMonth() + 1;\r\n var days=today.getDate();\r\n}}\r\n/*\r\n * @author : \r\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\r\n * @desc : {{=it.func.join(it.defName,it.comment,'-')}}\r\n */\r\nclass {{=it.func.camel(it.defKey, true)}} {\r\n constructor() {\r\n {{~it.fields:field:index}}\r\n this._{{=it.func.camel(field.defKey, true)}} = null;\r\n {{~}}\r\n }\r\n\r\n {{~it.fields:field:index}}\r\n /**\r\n * {{=it.func.join(field.defName, field.comment, ';')}}\r\n */\r\n get {{=it.func.camel(field.defKey, true)}}() {\r\n return this._{{=it.func.camel(field.defKey, true)}};\r\n }\r\n\r\n set {{=it.func.camel(field.defKey, true)}}(value) {\r\n this._{{=it.func.camel(field.defKey, true)}} = value;\r\n }\r\n {{~}}\r\n\r\n toString() {\r\n return JSON.stringify(this);\r\n }\r\n}\r\n" + } + ] + } + ] + }, + { + "defKey": "Python", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 6, + "isEnabled": 0, + "id": "BPP6MLTRQ7EAC", + "codegens": [ + { + "genKey": "default", + "genIntro": null, + "genItems": [ + { + "itemKey": "content", + "itemIntro": null, + "itemTemplate": "{{\r\n var today=new Date();\r\n var fullYear=today.getFullYear();\r\n var month=today.getMonth() + 1;\r\n var days=today.getDate();\r\n}}\r\n\r\n\"\"\"\r\n @author : \r\n @date : {{=fullYear}}-{{=month}}-{{=days}}\r\n @desc : {{=it.func.join(it.defName,it.comment,'-')}}\r\n\"\"\"\r\nclass {{=it.func.camel(it.defKey, true)}}:\r\n def __init__(self):\r\n # Initialize properties as None\r\n {{~it.fields:field:index}}\r\n self._{{=it.func.camel(field.defKey, true)}} = None\r\n {{~}}\r\n\r\n {{~it.fields:field:index}}\r\n @property\r\n def {{=it.func.camel(field.defKey, true)}}(self):\r\n \"\"\"\r\n {{=it.func.join(field.defName, field.comment, ';')}}\r\n \"\"\"\r\n return self._{{=it.func.camel(field.defKey, true)}}\r\n\r\n @{{=it.func.camel(field.defKey, true)}}.setter\r\n def {{=it.func.camel(field.defKey, true)}}(self, value):\r\n self._{{=it.func.camel(field.defKey, true)}} = value\r\n {{~}}\r\n\r\n def __str__(self):\r\n # Return a string representation of the object\r\n return str(self.__dict__)\r\n\r\n{{\r\n var today=new Date();\r\n var fullYear=today.getFullYear();\r\n var month=today.getMonth() + 1;\r\n var days=today.getDate();\r\n}}" + } + ] + } + ] + }, + { + "defKey": "PHP", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 7, + "isEnabled": 0, + "id": "BPP6MMSQQ7EAB", + "codegens": [ + { + "genKey": "default", + "genIntro": null, + "genItems": [ + { + "itemKey": "content", + "itemIntro": null, + "itemTemplate": "properties['{{=it.func.camel(field.defKey,true)}}'] = null;\r\n {{~}}\r\n }\r\n\r\n {{~it.fields:field:index}}\r\n /**\r\n * {{=it.func.join(field.defName, field.comment, ';')}}\r\n */\r\n public function get{{=it.func.camel(field.defKey, true)}}(): {{=field.langDataType}} {\r\n return $this->properties['{{=it.func.camel(field.defKey,true)}}'];\r\n }\r\n\r\n public function set{{=it.func.camel(field.defKey, true)}}($value): void {\r\n $this->properties['{{=it.func.camel(field.defKey,true)}}'] = $value;\r\n }\r\n {{~}}\r\n\r\n public function __toString() {\r\n return json_encode($this->properties);\r\n }\r\n}\r\n\r\n?>\r\n\r\n" + } + ] + } + ] + }, + { + "defKey": "CAndCpp", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 8, + "isEnabled": 0, + "id": "BPP6MO4ZM7EAB", + "codegens": [ + { + "genKey": "default", + "genIntro": null, + "genItems": [ + { + "itemKey": "C", + "itemIntro": null, + "itemTemplate": "#include \r\n#include \r\n#include \r\n\r\ntypedef struct {\r\n {{~it.fields:field:index}}\r\n {{=field.langDataType}} {{=it.func.camel(field.defKey, false)}};\r\n {{~}}\r\n} {{=it.func.camel(it.defKey, true)}};\r\n\r\n// Functions to interact with the bean\r\nvoid {{=it.func.camel(it.defKey, true)}}_init({{=it.func.camel(it.defKey, true)}} *bean) {\r\n {{~it.fields:field:index}}\r\n bean->{{=it.func.camel(field.defKey, false)}} = null;\r\n {{~}}\r\n}\r\n\r\n{{~it.fields:field:index}}\r\n/**\r\n * {{=it.func.join(field.defName, field.comment, ';')}}\r\n */\r\n{{=field.langDataType}} {{=it.func.camel(it.defKey, true)}}_get{{=it.func.camel(field.defKey, true)}}({{=it.func.camel(it.defKey, true)}} *bean) {\r\n return bean->{{=it.func.camel(field.defKey, false)}};\r\n}\r\n\r\nvoid {{=it.func.camel(it.defKey, true)}}_set{{=it.func.camel(field.defKey, true)}}({{=it.func.camel(it.defKey, true)}} *bean, {{=field.langDataType}} value) {\r\n bean->{{=it.func.camel(field.defKey, false)}} = value;\r\n}\r\n{{~}}\r\n\r\nvoid {{=it.func.camel(it.defKey, true)}}_print(const {{=it.func.camel(it.defKey, true)}} *bean) {\r\n printf(\"{{=it.func.camel(it.defKey, true)}} {\");\r\n {{~it.fields:field:index}}\r\n printf(\" %s: %d\", \"{{=it.func.camel(field.defKey, false)}}\", bean->{{=it.func.camel(field.defKey, false)}});\r\n {{~}}\r\n printf(\" }\\n\");\r\n}\r\n\r\n" + }, + { + "itemKey": "C++", + "itemIntro": null, + "itemTemplate": "#include \r\n#include \r\n#include \r\n#include \r\n\r\n{{\r\n var today=new Date();\r\n var fullYear=today.getFullYear();\r\n var month=today.getMonth() + 1;\r\n var days=today.getDate();\r\n}}\r\n/*\r\n * @author : \r\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\r\n * @desc : {{=it.func.join(it.defName,it.comment,'-')}}\r\n */\r\nclass {{=it.func.camel(it.defKey, true)}} {\r\npublic:\r\n // Constructor\r\n {{=it.func.camel(it.defKey, true)}}() {\r\n // Initialize properties\r\n {{~it.fields:field:index}}\r\n _{{=it.func.camel(field.defKey, true)}} = {};\r\n {{~}}\r\n }\r\n\r\n // Getters and Setters\r\n {{~it.fields:field:index}}\r\n /**\r\n * {{=it.func.join(field.defName, field.comment, ';')}}\r\n */\r\n {{=field.langDataType}} get{{=it.func.camel(field.defKey, true)}}() const {\r\n return _{{=it.func.camel(field.defKey, true)}};\r\n }\r\n\r\n void set{{=it.func.camel(field.defKey, true)}}({{=field.langDataType}} value) {\r\n _{{=it.func.camel(field.defKey, true)}} = value;\r\n }\r\n {{~}}\r\n\r\n // Convert to string\r\n std::string toString() const {\r\n std::ostringstream oss;\r\n oss << \"{{=it.func.camel(it.defKey, true)}} {\";\r\n {{~it.fields:field:index}}\r\n oss << \" \" << \"{{=it.func.camel(field.defKey, true)}}\" << \": \" << _{{=it.func.camel(field.defKey, true)}};\r\n {{~}}\r\n oss << \" }\";\r\n return oss.str();\r\n }\r\n\r\nprivate:\r\n {{~it.fields:field:index}}\r\n {{=field.langDataType}} _{{=it.func.camel(field.defKey, true)}};\r\n {{~}}\r\n};\r\n\r\n// Metadata\r\nconst std::string author = \"http://www.chiner.com.cn\";\r\nstd::time_t t = std::time(nullptr);\r\nstd::tm* tm = std::localtime(&t);\r\nstd::ostringstream dateStream;\r\ndateStream << (1900 + tm->tm_year) << \"-\" << (1 + tm->tm_mon) << \"-\" << tm->tm_mday;\r\nconst std::string date = dateStream.str();\r\nconst std::string desc = \"{{=it.func.join(it.defName, it.comment, '-') }}\";\r\n\r\nint main() {\r\n std::cout << \"Author: \" << author << std::endl;\r\n std::cout << \"Date: \" << date << std::endl;\r\n std::cout << \"Description: \" << desc << std::endl;\r\n\r\n {{=it.func.camel(it.defKey, true)}} obj;\r\n std::cout << obj.toString() << std::endl;\r\n\r\n return 0;\r\n}\r\n" + } + ] + } + ] + }, + { + "defKey": "Swift", + "defName": null, + "icon": "\n \n \n \n \n ", + "color": "", + "orderValue": 9, + "isEnabled": 0, + "id": "BPP6MQB6M7EAB", + "codegens": [ + { + "genKey": "default", + "genIntro": null, + "genItems": [ + { + "itemKey": "content", + "itemIntro": null, + "itemTemplate": "import Foundation\r\n\r\n{{\r\n var today=new Date();\r\n var fullYear=today.getFullYear();\r\n var month=today.getMonth() + 1;\r\n var days=today.getDate();\r\n}}\r\n/*\r\n * @author : \r\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\r\n * @desc : {{=it.func.join(it.defName,it.comment,'-')}}\r\n */\r\nclass {{=it.func.camel(it.defKey, true)}} {\r\n // Properties\r\n {{~it.fields:field:index}}\r\n /// {{=it.func.join(field.defName, field.comment, \";\")}}\r\n var {{=it.func.camel(field.defKey, false)}}: {{=field.langDataType}}?\r\n {{~}}\r\n\r\n // Initializer\r\n init() {\r\n // Initialize properties if needed\r\n {{~it.fields:field:index}}\r\n self.{{=it.func.camel(field.defKey, false)}} = nil\r\n {{~}}\r\n }\r\n\r\n // Description\r\n func description() -> String {\r\n return \"\"\"\r\n {{=it.func.camel(it.defKey, true)}} {\r\n {{~it.fields:field:index}}\r\n {{=it.func.camel(field.defKey, false)}}: \\(String(describing: {{=it.func.camel(field.defKey, false)}}))\r\n {{~}}\r\n }\r\n \"\"\"\r\n }\r\n}\r\n{{\r\n var today=new Date();\r\n var fullYear=today.getFullYear();\r\n var month=today.getMonth() + 1;\r\n var days=today.getDate();\r\n}}\r\n" + } + ] + } + ] + } + ], + "dataTypes": [ + { + "id": "S_1KH33AC0D2V01", + "defKey": "CHAR", + "defName": "CHAR", + "icon": "", + "color": null, + "requireLen": 1, + "requireScale": 0, + "lenMax": "0", + "often": "5", + "orderValue": 0, + "dbDataType": { + "XuguDB": "CHAR", + "DaMeng": "CHAR", + "KingBase": "CHAR", + "SQLite": "CHAR", + "Inceptor": "CHAR", + "Oracle": "CHAR", + "HighGo": "CHAR", + "GaussDB": "CHAR", + "OceanBase-Mysql": "CHAR", + "MaxCompute": "CHAR", + "Doris": "VARCHAR", + "ClickHouse": "FixedString", + "GBase 8A": "CHAR", + "StarRocks": "CHAR", + "ShenTong": "CHAR", + "Impala": "CHAR", + "OceanBase-Oracle": "CHAR", + "Hive": "CHAR", + "GBase 8S": "CHAR", + "DaMeng_1": "CHAR", + "DB2": "CHAR", + "Oracle_9": "CHAR", + "SQLServer": "CHAR", + "GBase 8s": "CHAR", + "PostgreSQL": "CHAR", + "MySQL": "CHAR" + }, + "langDataType": { + "CSharp": "string", + "Rust": "String", + "CAndCpp": "std::string", + "PHP": "string", + "Swift": "String", + "testa": "char5", + "GoLang": "string", + "NodeJS": "string", + "Python": "str", + "Java": "String" + } + }, + { + "id": "S_BPQI3EFQE64AB", + "defKey": "VARCHAR", + "defName": "VARCHAR", + "icon": "", + "color": null, + "requireLen": 1, + "requireScale": 0, + "lenMax": "", + "often": "9", + "orderValue": 1, + "dbDataType": { + "XuguDB": "VARCHAR", + "DaMeng": "VARCHAR", + "KingBase": "VARCHAR", + "SQLite": "TEXT", + "Inceptor": "VARCHAR", + "Oracle": "VARCHAR2", + "HighGo": "VARCHAR", + "GaussDB": "VARCHAR2", + "OceanBase-Mysql": "VARCHAR", + "MaxCompute": "VARCHAR", + "Doris": "VARCHAR", + "ClickHouse": "String", + "GBase 8A": "VARCHAR", + "StarRocks": "VARCHAR", + "ShenTong": "VARCHAR", + "Impala": "VARCHAR", + "OceanBase-Oracle": "VARCHAR2", + "Hive": "VARCHAR", + "GBase 8S": "VARCHAR", + "DaMeng_1": "VARCHAR", + "DB2": "VARCHAR", + "Oracle_9": "VARCHAR2", + "SQLServer": "VARCHAR", + "GBase 8s": "VARCHAR", + "PostgreSQL": "VARCHAR", + "MySQL": "VARCHAR" + }, + "langDataType": { + "CSharp": "string", + "Rust": "String", + "CAndCpp": "std::string", + "PHP": "string", + "Swift": "String", + "testa": "varchar", + "GoLang": "string", + "NodeJS": "String", + "Python": "str", + "Java": "String" + } + }, + { + "id": "S_1KH3C7JJV2V02", + "defKey": "TINYINT", + "defName": "TINYINT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": "0", + "often": "9", + "orderValue": 2, + "dbDataType": { + "XuguDB": "TINYINT", + "DaMeng": "TINYINT", + "KingBase": "TINYINT", + "SQLite": "TINYINT", + "Inceptor": "TINYINT", + "Oracle": "INTEGER", + "HighGo": "TINYINT", + "GaussDB": "TINYINT", + "OceanBase-Mysql": "TINYINT", + "MaxCompute": "TINYINT", + "Doris": "TINYINT", + "ClickHouse": "Int8", + "GBase 8A": "TINYINT", + "StarRocks": "TINYINT", + "ShenTong": "TINYINT", + "Impala": "TINYINT", + "OceanBase-Oracle": "INTEGER", + "Hive": "TINYINT", + "GBase 8S": "", + "DaMeng_1": "TINYINT", + "DB2": "SMALLINT", + "Oracle_9": "INTEGER", + "SQLServer": "TINYINT", + "GBase 8s": "TINYINT", + "PostgreSQL": "INT2", + "MySQL": "TINYINT" + }, + "langDataType": { + "CSharp": "byte", + "Rust": "i8", + "CAndCpp": "int8_t", + "PHP": "integer", + "Swift": "Int8", + "testa": "tiniyint", + "GoLang": "int8", + "NodeJS": "Number", + "Python": "int", + "Java": "Byte" + } + }, + { + "id": "S_1K762TYDMP802", + "defKey": "SMALLINT", + "defName": "SMALLINT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": null, + "often": "5", + "orderValue": 3, + "dbDataType": { + "XuguDB": "SMALLINT", + "DaMeng": "SMALLINT", + "KingBase": "SMALLINT", + "SQLite": "SMALLINT", + "Inceptor": "SMALLINT", + "Oracle": "INTEGER", + "HighGo": "SMALLINT", + "GaussDB": "SMALLINT", + "OceanBase-Mysql": "SMALLINT", + "MaxCompute": "SMALLINT", + "Doris": "SMALLINT", + "ClickHouse": "Int16", + "GBase 8A": "SMALLINT", + "StarRocks": "SMALLINT", + "ShenTong": "SMALLINT", + "Impala": "SMALLINT", + "OceanBase-Oracle": "INTEGER", + "Hive": "SMALLINT", + "GBase 8S": "SMALLINT", + "DaMeng_1": "SMALLINT", + "DB2": "SMALLINT", + "Oracle_9": "INTEGER", + "SQLServer": "SMALLINT", + "GBase 8s": "SMALLINT", + "PostgreSQL": "INT2", + "MySQL": "SMALLINT" + }, + "langDataType": { + "CSharp": "short", + "Rust": "i16", + "CAndCpp": "int16_t", + "PHP": "integer", + "Swift": "Int16", + "testa": "smallint", + "GoLang": "int16", + "NodeJS": "Number", + "Python": "int", + "Java": "Short" + } + }, + { + "id": "S_1KH3CKM5V2V01", + "defKey": "MEDIUMINT", + "defName": "MEDIUMINT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": "0", + "often": "5", + "orderValue": 4, + "dbDataType": { + "XuguDB": "", + "DaMeng": "INTEGER", + "KingBase": "", + "SQLite": "MEDIUMINT", + "Inceptor": "INT", + "Oracle": "INTEGER", + "HighGo": "", + "GaussDB": "MEDIUMINT", + "OceanBase-Mysql": "MEDIUMINT", + "MaxCompute": "INT", + "Doris": "", + "ClickHouse": "", + "GBase 8A": "", + "StarRocks": "", + "ShenTong": "INT", + "Impala": "", + "OceanBase-Oracle": "INTEGER", + "Hive": "", + "GBase 8S": "", + "DaMeng_1": "INTEGER", + "DB2": "INTEGER", + "Oracle_9": "INTEGER", + "SQLServer": "INT", + "PostgreSQL": "INT", + "MySQL": "MEDIUMINT" + }, + "langDataType": { + "CSharp": "int", + "Rust": "i32", + "CAndCpp": "int32_t", + "PHP": "integer", + "Swift": "Int32", + "testa": "mediumint", + "GoLang": "int32", + "NodeJS": "Number", + "Python": "int", + "Java": "Integer" + } + }, + { + "id": "S_BPQI3JDIY64AC", + "defKey": "INT", + "defName": "INT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": "", + "often": "9", + "orderValue": 5, + "dbDataType": { + "XuguDB": "INTEGER", + "DaMeng": "INTEGER", + "KingBase": "INTEGER", + "SQLite": "INTEGER", + "Inceptor": "INT", + "Oracle": "INTEGER", + "HighGo": "INTEGER", + "GaussDB": "INTEGER", + "OceanBase-Mysql": "INTEGER", + "MaxCompute": "INT", + "Doris": "INT", + "ClickHouse": "Int32", + "GBase 8A": "INT", + "StarRocks": "INT", + "ShenTong": "INT", + "Impala": "INT", + "OceanBase-Oracle": "INTEGER", + "Hive": "INT", + "GBase 8S": "INTEGER", + "DaMeng_1": "INTEGER", + "DB2": "INTEGER", + "Oracle_9": "INTEGER", + "SQLServer": "INT", + "GBase 8s": "INT", + "PostgreSQL": "INT4", + "MySQL": "INT" + }, + "langDataType": { + "CSharp": "int", + "Rust": "i32", + "CAndCpp": "int", + "PHP": "int", + "Swift": "Int", + "testa": "int", + "GoLang": "int", + "NodeJS": "Number", + "Python": "int", + "Java": "Integer" + } + }, + { + "id": "S_1JY39V9QR0H01", + "defKey": "BIGINT", + "defName": "BIGINT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": null, + "often": "9", + "orderValue": 6, + "dbDataType": { + "XuguDB": "BIGINT", + "DaMeng": "BIGINT", + "KingBase": "BIGINT", + "SQLite": "BIGHTINT", + "Inceptor": "BIGINT", + "Oracle": "INTEGER", + "HighGo": "BIGINT", + "GaussDB": "BIGINT", + "OceanBase-Mysql": "BIGINT", + "MaxCompute": "BIGINT", + "Doris": "BIGINT", + "ClickHouse": "Int64", + "GBase 8A": "BIGINT", + "StarRocks": "BIGINT", + "ShenTong": "BIGINT", + "Impala": "BIGINT", + "OceanBase-Oracle": "BIGINT", + "Hive": "BIGINT", + "GBase 8S": "BIGINT", + "DaMeng_1": "BIGINT", + "DB2": "BIGINT", + "Oracle_9": "INTEGER", + "SQLServer": "BIGINT", + "PostgreSQL": "INT8", + "MySQL": "BIGINT" + }, + "langDataType": { + "CSharp": "long", + "Rust": "i64", + "CAndCpp": "int64_t", + "PHP": "integer", + "Swift": "Int64", + "testa": "b", + "GoLang": "int64", + "NodeJS": "BigInt", + "Python": "int", + "Java": "Long" + } + }, + { + "id": "S_1KH3CUG482V02", + "defKey": "FLOAT", + "defName": "FLOAT", + "icon": "", + "color": null, + "requireLen": 1, + "requireScale": 1, + "lenMax": "0", + "often": "5", + "orderValue": 7, + "dbDataType": { + "XuguDB": "FLOAT", + "DaMeng": "REAL", + "KingBase": "REAL", + "SQLite": "FLOAT", + "Inceptor": "FLOAT", + "Oracle": "FLOAT", + "HighGo": "REAL", + "GaussDB": "REAL", + "OceanBase-Mysql": "BIGINT", + "MaxCompute": "FLOAT", + "Doris": "", + "ClickHouse": "Float32", + "GBase 8A": "FLOAT", + "StarRocks": "FLOAT", + "ShenTong": "FLOAT", + "Impala": "REAL", + "OceanBase-Oracle": "FLOAT", + "Hive": "FLOAT", + "GBase 8S": "REAL", + "DaMeng_1": "REAL", + "DB2": "REAL", + "Oracle_9": "FLOAT", + "SQLServer": "REAL", + "PostgreSQL": "FLOAT4", + "MySQL": "FLOAT" + }, + "langDataType": { + "CSharp": "float", + "Rust": "f32", + "CAndCpp": "float", + "PHP": "float", + "Swift": "Float", + "testa": "", + "GoLang": "float32", + "NodeJS": "Number", + "Python": "float", + "Java": "Float" + } + }, + { + "id": "S_BPQI3HBUQ64AC", + "defKey": "DOUBLE", + "defName": "DOUBLE", + "icon": "", + "color": null, + "requireLen": 1, + "requireScale": 1, + "lenMax": null, + "often": "5", + "orderValue": 8, + "dbDataType": { + "XuguDB": "DOUBLE", + "DaMeng": "DOUBLE", + "KingBase": "DOUBLE PRECISION", + "SQLite": "DOUBLE", + "Inceptor": "DOUBLE", + "Oracle": "BINARY_DOUBLE", + "HighGo": "DOUBLE PRECISION", + "GaussDB": "DOUBLE PRECISION", + "OceanBase-Mysql": "DOUBLE", + "MaxCompute": "DOUBLE", + "Doris": "DECIMAL", + "ClickHouse": "Float64", + "GBase 8A": "DOUBLE", + "StarRocks": "DOUBLE", + "ShenTong": "NUMERIC", + "Impala": "FLOAT", + "OceanBase-Oracle": "DOUBLE PRECISION", + "Hive": "DOUBLE", + "GBase 8S": "FLOAT", + "DaMeng_1": "DOUBLE", + "DB2": "DOUBLE", + "Oracle_9": "BINARY_DOUBLE", + "SQLServer": "FLOAT", + "PostgreSQL": "FLOAT8", + "MySQL": "DOUBLE" + }, + "langDataType": { + "CSharp": "double", + "Rust": "f64", + "CAndCpp": "double", + "PHP": "float", + "Swift": "Double", + "testa": "", + "GoLang": "float64", + "NodeJS": "Number", + "Python": "float", + "Java": "Double" + } + }, + { + "id": "S_1KH3D5CQR2V01", + "defKey": "DECIMAL", + "defName": "DECIMAL", + "icon": "", + "color": null, + "requireLen": 1, + "requireScale": 1, + "lenMax": "0", + "often": "9", + "orderValue": 9, + "dbDataType": { + "XuguDB": "NUMERIC", + "DaMeng": "DECIMAL", + "KingBase": "NUMERIC", + "SQLite": "DECIMAL", + "Inceptor": "DECIMAL", + "Oracle": "DECIMAL", + "HighGo": "NUMERIC", + "GaussDB": "NUMERIC", + "OceanBase-Mysql": "DECIMAL", + "MaxCompute": "DECIMAL", + "Doris": "DECIMAL", + "ClickHouse": "Decimal", + "GBase 8A": "DOUBLE", + "StarRocks": "DECIMAL", + "ShenTong": "NUMERIC", + "Impala": "DECIMAL", + "OceanBase-Oracle": "DECIMAL", + "Hive": "DECIMAL", + "GBase 8S": "DECIMAL", + "DaMeng_1": "DECIMAL", + "DB2": "DECIMAL", + "Oracle_9": "DECIMAL", + "SQLServer": "DECIMAL", + "PostgreSQL": "DECIMAL", + "MySQL": "DECIMAL" + }, + "langDataType": { + "CSharp": "decimal", + "Rust": "BigDecimal", + "CAndCpp": "", + "PHP": "float", + "Swift": "Decimal", + "testa": "", + "GoLang": "big.Float", + "NodeJS": "Number", + "Python": "decimal.Decimal", + "Java": "BigDecimal" + } + }, + { + "id": "S_1KH3E6H182V02", + "defKey": "TIME", + "defName": "TIME", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": "0", + "often": "5", + "orderValue": 10, + "dbDataType": { + "XuguDB": "TIME", + "DaMeng": "TIME", + "KingBase": "TIME", + "SQLite": "TIME", + "Inceptor": "TIME", + "Oracle": "", + "HighGo": "TIME", + "GaussDB": "TIME", + "OceanBase-Mysql": "TIME", + "MaxCompute": "", + "Doris": "", + "ClickHouse": "", + "GBase 8A": "TIME", + "StarRocks": "", + "ShenTong": "TIME", + "Impala": "", + "OceanBase-Oracle": "DATE", + "Hive": "", + "GBase 8S": "", + "DaMeng_1": "TIME", + "DB2": "TIME", + "Oracle_9": "", + "SQLServer": "TIME", + "PostgreSQL": "TIME", + "MySQL": "TIME" + }, + "langDataType": { + "CSharp": "TimeSpan", + "Rust": "NaiveTime", + "CAndCpp": "", + "PHP": "DateTime", + "Swift": "Date", + "testa": "", + "GoLang": "time.Duration", + "NodeJS": "Date", + "Python": "datetime.time", + "Java": "LocalTime" + } + }, + { + "id": "S_BPQIJ7OGY7YAC", + "defKey": "DATE", + "defName": "DATE", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": null, + "often": "5", + "orderValue": 11, + "dbDataType": { + "XuguDB": "DATE", + "DaMeng": "DATE", + "KingBase": "DATE", + "SQLite": "DATE", + "Inceptor": "DATE", + "Oracle": "DATE", + "HighGo": "DATE", + "GaussDB": "DATE", + "OceanBase-Mysql": "DATE", + "MaxCompute": "DATE", + "Doris": "DATE", + "ClickHouse": "Date", + "GBase 8A": "DATE", + "StarRocks": "DATE", + "ShenTong": "DATE", + "Impala": "DATE", + "OceanBase-Oracle": "DATE", + "Hive": "DATE", + "GBase 8S": "DATE", + "DaMeng_1": "DATE", + "DB2": "DATE", + "Oracle_9": "DATE", + "SQLServer": "DATE", + "PostgreSQL": "DATE", + "MySQL": "DATE" + }, + "langDataType": { + "CSharp": "DateTime", + "Rust": "chrono::NaiveDate", + "CAndCpp": "", + "PHP": "DateTime", + "Swift": "Date", + "testa": "", + "GoLang": "time.Time", + "NodeJS": "Date", + "Python": "datetime.date", + "Java": "LocalDate" + } + }, + { + "id": "S_1JY3EDEDV3801", + "defKey": "DATETIME", + "defName": "DATETIME", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": null, + "often": "9", + "orderValue": 12, + "dbDataType": { + "XuguDB": "DATETIME", + "DaMeng": "DATETIME", + "KingBase": "DATETIME", + "SQLite": "DATETIME", + "Inceptor": "DATE", + "Oracle": "TIMESTAMP", + "HighGo": "TIMESTAMP", + "GaussDB": "DATETIME", + "OceanBase-Mysql": "DATETIME", + "MaxCompute": "DATETIME", + "Doris": "DATETIME", + "ClickHouse": "DateTime", + "GBase 8A": "", + "StarRocks": "DATETIME", + "ShenTong": "TIMESTAMP", + "Impala": "", + "OceanBase-Oracle": "TIMESTAMP", + "Hive": "TIMESTAMP", + "GBase 8S": "DATETIME", + "DaMeng_1": "DATETIME", + "DB2": "TIMESTAMP", + "Oracle_9": "TIMESTAMP", + "SQLServer": "DATETIME", + "PostgreSQL": "TIMESTAMP", + "MySQL": "DATETIME" + }, + "langDataType": { + "CSharp": "DateTime", + "Rust": "chrono::NaiveDateTime", + "CAndCpp": "", + "PHP": "DateTime", + "Swift": "Date", + "testa": "", + "GoLang": "time.Time", + "NodeJS": "Date", + "Python": "datetime.datetime", + "Java": "LocalDateTime" + } + }, + { + "id": "S_1KH3EXFL02V02", + "defKey": "TINYTEXT", + "defName": "TINYTEXT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": "0", + "often": "1", + "orderValue": 13, + "dbDataType": { + "XuguDB": "CLOB", + "DaMeng": "TEXT", + "KingBase": "TEXT", + "SQLite": "INYTEXT", + "Inceptor": "STRING", + "Oracle": "CLOB", + "HighGo": "TEXT", + "GaussDB": "TEXT", + "OceanBase-Mysql": "TINYTEXT", + "MaxCompute": "STRING", + "Doris": "", + "ClickHouse": "TEXT", + "GBase 8A": "TEXT", + "StarRocks": "STRING", + "ShenTong": "TEXT", + "Impala": "STRING", + "OceanBase-Oracle": "CLOB", + "Hive": "STRING", + "GBase 8S": "TEXT", + "DaMeng_1": "TEXT", + "DB2": "CLOB", + "Oracle_9": "CLOB", + "SQLServer": "TEXT", + "PostgreSQL": "TEXT", + "MySQL": "TINYTEXT" + }, + "langDataType": { + "CSharp": "string", + "Rust": "String", + "CAndCpp": "std::string", + "PHP": "string", + "Swift": "String", + "testa": "", + "GoLang": "string", + "NodeJS": "string", + "Python": "str", + "Java": "String" + } + }, + { + "id": "S_1KH3F5LVM2V01", + "defKey": "MEDIUMTEXT", + "defName": "MEDIUMTEXT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": "0", + "often": "5", + "orderValue": 14, + "dbDataType": { + "XuguDB": "CLOB", + "DaMeng": "TEXT", + "KingBase": "TEXT", + "SQLite": "MEDIUMTEXT", + "Inceptor": "STRING", + "Oracle": "CLOB", + "HighGo": "TEXT", + "GaussDB": "TEXT", + "OceanBase-Mysql": "MEDIUMTEXT", + "MaxCompute": "STRING", + "Doris": "", + "ClickHouse": "TEXT", + "GBase 8A": "TEXT", + "StarRocks": "STRING", + "ShenTong": "TEXT", + "Impala": "STRING", + "OceanBase-Oracle": "CLOB", + "Hive": "STRING", + "GBase 8S": "TEXT", + "DaMeng_1": "TEXT", + "DB2": "CLOB", + "Oracle_9": "CLOB", + "SQLServer": "TEXT", + "PostgreSQL": "TEXT", + "MySQL": "MEDIUMTEXT" + }, + "langDataType": { + "CSharp": "string", + "Rust": "String", + "CAndCpp": "std::string", + "PHP": "string", + "Swift": "String", + "testa": "", + "GoLang": "string", + "NodeJS": "string", + "Python": "str", + "Java": "String" + } + }, + { + "id": "S_1K281U4GH3D02", + "defKey": "TEXT", + "defName": "TEXT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": null, + "often": "9", + "orderValue": 15, + "dbDataType": { + "XuguDB": "CLOB", + "DaMeng": "TEXT", + "KingBase": "TEXT", + "SQLite": "TEXT", + "Inceptor": "STRING", + "Oracle": "CLOB", + "HighGo": "TEXT", + "GaussDB": "TEXT", + "OceanBase-Mysql": "TEXT", + "MaxCompute": "STRING", + "Doris": "VARCHAR", + "ClickHouse": "TEXT", + "GBase 8A": "TEXT", + "StarRocks": "STRING", + "ShenTong": "TEXT", + "Impala": "STRING", + "OceanBase-Oracle": "CLOB", + "Hive": "STRING", + "GBase 8S": "TEXT", + "DaMeng_1": "TEXT", + "DB2": "CLOB", + "Oracle_9": "CLOB", + "SQLServer": "TEXT", + "PostgreSQL": "TEXT", + "MySQL": "TEXT" + }, + "langDataType": { + "CSharp": "string", + "Rust": "String", + "CAndCpp": "std::string", + "PHP": "string", + "Swift": "String", + "testa": "", + "GoLang": "string", + "NodeJS": "string", + "Python": "str", + "Java": "String" + } + }, + { + "id": "S_BPQI3LGVA64AC", + "defKey": "LONGTEXT", + "defName": "LONGTEXT", + "icon": "", + "color": null, + "requireLen": 0, + "requireScale": 0, + "lenMax": "22", + "often": "5", + "orderValue": 16, + "dbDataType": { + "XuguDB": "CLOB", + "DaMeng": "TEXT", + "KingBase": "TEXT", + "SQLite": "LONGTEXT", + "Inceptor": "STRING", + "Oracle": "CLOB", + "HighGo": "TEXT", + "GaussDB": "TEXT", + "OceanBase-Mysql": "LONGTEXT", + "MaxCompute": "STRING", + "Doris": "VARCHAR", + "ClickHouse": "TEXT", + "GBase 8A": "TEXT", + "StarRocks": "STRING", + "ShenTong": "TEXT", + "Impala": "STRING", + "OceanBase-Oracle": "CLOB", + "Hive": "STRING", + "GBase 8S": "TEXT", + "DaMeng_1": "TEXT", + "DB2": "CLOB", + "Oracle_9": "CLOB", + "SQLServer": "TEXT", + "PostgreSQL": "TEXT", + "MySQL": "LONGTEXT" + }, + "langDataType": { + "CSharp": "string", + "Rust": "String", + "CAndCpp": "std::string", + "PHP": "string", + "Swift": "String", + "testa": "", + "GoLang": "string", + "NodeJS": "string", + "Python": "str", + "Java": "String" + } + } + ], + "opceTemplets": [ + { + "opceKey": "MOP_BATCH_ADJUST", + "opceName": "批量调整", + "opceIntro": "", + "affectDdl": false, + "orderValue": 36, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_BATCH_UPDATE_DATATYPE", + "opceName": "批量更新数据类型", + "opceIntro": "", + "affectDdl": false, + "orderValue": 35, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_CATEGORY_CREATE", + "opceName": "目录创建", + "opceIntro": "", + "affectDdl": false, + "orderValue": 4, + "dataSample": "{\n \"ctId\": \"C0C9787E-7940-4CA0-9990-3208EC4CBFCD\",\n \"event\": \"MOP_CATEGORY_CREATE\",\n \"payload\": [\n {\n \"type\": \"peer\",\n \"to\": null,\n \"position\": null,\n \"data\": {\n \"id\": \"P0276.B01.3OJXVDG4HQAA\",\n \"defKey\": \"base\",\n \"defName\": \"基础信息\"\n },\n \"hierarchyType\": \"TREE\"\n }\n ],\n \"timestamp\": \"1715934520168\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:item}}{{\r\n var defKey = item.data.defKey;\r\n var defName = item.data.defName;\r\n}}{{=defName||defKey}}{{? defKey !== defName && defKey !== \"\"}}({{=defKey}}){{?}}\r\n{{~}}" + }, + { + "opceKey": "MOP_CATEGORY_DELETE", + "opceName": "目录删除", + "opceIntro": "", + "affectDdl": false, + "orderValue": 6, + "dataSample": "{\n \"ctId\": \"1E36AB6E-54E4-4170-8279-FD4442E45192\",\n \"event\": \"MOP_CATEGORY_DELETE\",\n \"payload\": [\n {\n \"from\": \"P0303.B01.3OJF6U2AGIAA\",\n \"type\": \"peer\",\n \"position\": \"before\",\n \"data\": {\n \"id\": \"P0303.B01.3OJXVDG4HQAA\",\n \"parentId\": null,\n \"defKey\": \"course\",\n \"defName\": \"教学选课\",\n \"intro\": null,\n \"peerOrder\": null,\n \"nodeType\": \"category\"\n }\n }\n ],\n \"timestamp\": \"1715934701444\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:item}}{{\n var defKey = item.data.defKey;\n var defName = item.data.defName;\n}}{{=defName||defKey}}{{? defKey !== defName && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}" + }, + { + "opceKey": "MOP_CATEGORY_DRAG", + "opceName": "目录拖动", + "opceIntro": "", + "affectDdl": false, + "orderValue": 7, + "dataSample": "{\n \"ctId\": \"AD313434-6F0E-4C9C-8946-4D77E46DCD38\",\n \"event\": \"MOP_CATEGORY_DRAG\",\n \"payload\": [\n {\n \"pre\": {\n \"from\": \"P0303.B01.3OJRAFYMHQAA\",\n \"type\": \"peer\",\n \"position\": \"after\"\n },\n \"next\": {\n \"from\": \"P0303.B01.3OJXVDG4HQAA\",\n \"to\": \"P0303.B01.3OJF6U2AGIAA\",\n \"type\": \"peer\",\n \"position\": \"before\",\n \"data\": {\n \"id\": \"P0303.B01.3OJXVDG4HQAA\",\n \"parentId\": null,\n \"defKey\": \"course\",\n \"defName\": \"教学选课\",\n \"intro\": null,\n \"peerOrder\": null,\n \"nodeType\": \"category\"\n }\n },\n \"hierarchyType\": \"TREE\"\n }\n ],\n \"timestamp\": \"1715934650759\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:item}}{{\n var next = item.next;\n var defKey = next.data.defKey;\n var defName = next.data.defName;\n}}{{=defName||defKey}}{{? defKey !== defName && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}" + }, + { + "opceKey": "MOP_CATEGORY_UPDATE", + "opceName": "目录修改", + "opceIntro": "", + "affectDdl": false, + "orderValue": 5, + "dataSample": "{\n \"ctId\": \"9E7426B4-165A-4A85-BB4E-6295CF4A7D93\",\n \"event\": \"MOP_CATEGORY_UPDATE\",\n \"payload\": [\n {\n \"pre\": {\n \"id\": \"P0303.B01.3OJXVDG4HQAA\",\n \"from\": \"P0303.B01.3OJRAFYMHQAA\",\n \"type\": \"peer\",\n \"position\": \"after\",\n \"data\": {\n \"id\": \"P0303.B01.3OJXVDG4HQAA\",\n \"parentId\": null,\n \"defKey\": \"base\",\n \"defName\": \"基础信息\",\n \"intro\": null,\n \"peerOrder\": null,\n \"nodeType\": \"category\"\n }\n },\n \"next\": {\n \"id\": \"P0303.B01.3OJXVDG4HQAA\",\n \"from\": \"P0303.B01.3OJXVDG4HQAA\",\n \"to\": \"P0303.B01.3OJXVDG4HQAA\",\n \"type\": \"peer\",\n \"data\": {\n \"defKey\": \"course\",\n \"defName\": \"教学选课\"\n }\n }\n }\n ],\n \"timestamp\": \"1715934615044\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:item}}{{\n var preData = item.pre.data;\n var preDefKey = preData.defKey;\n var preDefName = preData.defName;\n var nextData = item.next.data;\n var nextDefKey = nextData.defKey;\n var nextDefName = nextData.defName;\n}}{{=nextDefName||nextDefKey}}{{? nextDefKey !== nextDefName && nextDefKey !== \"\"}}({{=nextDefKey}}){{?}} {{{? preDefKey !== nextDefKey}}代码:{{? preDefKey === \"\" || preDefKey === null}}<空>{{??}}{{=preDefKey}}{{?}} -> {{? nextDefKey === \"\" || nextDefKey === null}}<空>{{??}}{{=nextDefKey}}{{?}}; {{?}}{{? preDefName !== nextDefName}}名称:{{? preDefName === \"\" || preDefName === null}}<空>{{??}}{{=preDefName}}{{?}} -> {{? nextDefName === \"\" || nextDefName === null}}<空>{{??}}{{=nextDefName}}{{?}}{{?}}}\n{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_BATCH_ADJUST", + "opceName": "关系图批量调整", + "opceIntro": "", + "affectDdl": false, + "orderValue": 38, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_DIAGRAM_CATEGORY_CHANGE", + "opceName": "关系图改目录", + "opceIntro": "", + "affectDdl": false, + "orderValue": 36, + "dataSample": " {\n \"ctId\": \"31834E9E-1727-4B6E-9438-C887A74EC6A2\",\n \"event\": \"MOP_DIAGRAM_CATEGORY_CHANGE\",\n \"payload\": [\n {\n \"hierarchyType\": \"TREE\",\n \"pre\": {\n \"data\": {\n \"defKey\": \"dd\",\n \"defName\": \"dd\"\n },\n \"id\": \"P0423.B01.V0DH493V4800\",\n \"from\": null,\n \"position\": null,\n \"type\": \"sub\",\n \"diagramType\": \"P\"\n },\n \"next\": {\n \"data\": {\n \"defKey\": \"dd\",\n \"defName\": \"dd\"\n },\n \"id\": \"P0423.B01.V0DH493V4800\",\n \"from\": null,\n \"to\": \"P0423.B01.V0021SND4800\",\n \"type\": \"sub\",\n \"diagramType\": \"P\"\n }\n }\n ],\n \"userName\": \"xf\"\n }", + "messageTemplet": "{{\n var payload = it.payload;\n}}{{~ payload:item}}{{=item.pre.data.defKey}}[{{=item.pre.data.defName}}]\n{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_CREATE", + "opceName": "关系图创建", + "opceIntro": "", + "affectDdl": false, + "orderValue": 20, + "dataSample": "{\n \"ctId\": \"5C28E2FF-2DD3-45B6-A799-6814CF97F8F4\",\n \"event\": \"MOP_DIAGRAM_CREATE\",\n \"payload\": [\n {\n \"type\": \"sub\",\n \"to\": \"P0276.B01.BRPLUMHV4BUAC\",\n \"position\": null,\n \"data\": [\n {\n \"id\": \"P0276.B01.BRP47MFBMBEAD\",\n \"type\": \"L\",\n \"defKey\": \"CRSE_CORE\",\n \"defName\": \"教学选课逻辑模型图\",\n \"entityRelationRank\": \"F\"\n }\n ],\n \"hierarchyType\": \"TREE\"\n }\n ],\n \"timestamp\": \"1714011555428\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:item}}{{\n var data = item.data;\n}}{{~ data:item:index}}{{? item.type === \"C\"}}概念模型图{{?? item.type === \"L\"}}逻辑模型图{{?? item.type === \"P\"}}物理模型图{{?? item.type === \"F\"}}流程图{{?? item.type === \"M\"}}思维导图{{?}}: {{=item.defKey+((item.defKey!=item.defName&&`${item.defName}`)?`[${item.defName}]`:'')}}{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_DELETE", + "opceName": "关系图删除", + "opceIntro": "", + "affectDdl": false, + "orderValue": 22, + "dataSample": "{\r\n \"ctId\": \"1DE9AF8A-5C88-4B1E-BBC0-8DD20732B58F\",\r\n \"event\": \"MOP_DIAGRAM_DELETE\",\r\n \"payload\": [\r\n {\r\n \"from\": \"P0276.B01.BRP47MFBMBEAD\",\r\n \"type\": \"peer\",\r\n \"position\": \"before\",\r\n \"data\": {\r\n \"id\": \"P0276.B01.BRP47MFBMBEAF\",\r\n \"type\": \"P\",\r\n \"defKey\": \"CRSE_CORE\",\r\n \"defName\": \"教学选课逻辑模型\",\r\n \"intro\": \"\",\r\n \"entityRelationRank\": \"F\",\r\n \"mark\": null,\r\n \"props\": null,\r\n \"cellsData\": null,\r\n \"nodeType\": \"diagram\",\r\n \"draggable\": false\r\n }\r\n }\r\n ],\r\n \"timestamp\": \"1714011753005\",\r\n \"userName\": \"admin\",\r\n \"status\": \"SEND\",\r\n \"userId\": \"BREU3SAEM7AAB\"\r\n}", + "messageTemplet": "{{~it.payload:plRow}}{{\n var item = plRow.data;\n}}{{? item.type === \"C\"}}概念模型图{{?? item.type === \"L\"}}逻辑模型图{{?? item.type === \"P\"}}物理模型图{{?? item.type === \"F\"}}流程图{{?? item.type === \"M\"}}思维导图{{?}}: {{=item.defKey+((item.defKey!=item.defName&&`${item.defName}`)?`[${item.defName}]`:'')}}{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_DRAG", + "opceName": "关系图拖动", + "opceIntro": "", + "affectDdl": false, + "orderValue": 23, + "dataSample": "{\r\n \"ctId\": \"8D7AC2E8-0B37-4562-8543-18725A1964D4\",\r\n \"event\": \"MOP_DIAGRAM_DRAG\",\r\n \"payload\": [\r\n {\r\n \"pre\": {\r\n \"from\": \"P0276.B01.BRP47MFBMBEAD\",\r\n \"type\": \"peer\",\r\n \"position\": \"after\"\r\n },\r\n \"next\": {\r\n \"from\": \"P0276.B01.BRP47MFBMBEAF\",\r\n \"to\": \"P0276.B01.BRP47MFBMBEAD\",\r\n \"type\": \"peer\",\r\n \"position\": \"before\",\r\n \"data\": {\r\n \"id\": \"P0276.B01.BRP47MFBMBEAF\",\r\n \"type\": \"P\",\r\n \"defKey\": \"CRSE_CORE\",\r\n \"defName\": \"教学选课逻辑模型\",\r\n \"intro\": null,\r\n \"entityRelationRank\": \"F\",\r\n \"mark\": null,\r\n \"props\": null,\r\n \"cellsData\": null,\r\n \"parentId\": \"P0276.B01.BRPLUMHV4BUAC\",\r\n \"nodeType\": \"diagram\",\r\n \"draggable\": false\r\n }\r\n },\r\n \"hierarchyType\": \"TREE\"\r\n }\r\n ],\r\n \"timestamp\": \"1714011579054\",\r\n \"userName\": \"admin\",\r\n \"status\": \"SEND\",\r\n \"userId\": \"BREU3SAEM7AAB\"\r\n}", + "messageTemplet": "{{~it.payload:plRow}}{{\n var item = plRow.next.data;\n}}{{? item.type === \"C\"}}概念模型图{{?? item.type === \"L\"}}逻辑模型图{{?? item.type === \"P\"}}物理模型图{{?? item.type === \"F\"}}流程图{{?? item.type === \"M\"}}思维导图{{?}}: {{=item.defKey+((item.defKey!=item.defName&&`${item.defName}`)?`[${item.defName}]`:'')}}{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_ER_UPDATE", + "opceName": "ER关系图更新", + "opceIntro": "", + "affectDdl": false, + "orderValue": 31, + "dataSample": "{\r\n \"ctId\": \"44ECB8FA-A96F-4100-A469-A40147290272\",\r\n \"event\": \"MOP_DIAGRAM_ER_UPDATE\",\r\n \"payload\": [\r\n {\r\n \"diagramId\": \"P0423.B01.V09MAQMH4808\",\r\n \"defName\": \"jj\",\r\n \"defKey\": \"jj\",\r\n \"type\": \"P\",\r\n \"data\": [\r\n {\r\n \"batch\": true,\r\n \"data\": {\r\n \"key\": \"position\",\r\n \"prev\": {\r\n \"position\": {\r\n \"x\": -330,\r\n \"y\": -160\r\n }\r\n },\r\n \"id\": \"c804c0ab-e687-4ef3-9834-f58ef0062359\",\r\n \"next\": {\r\n \"position\": {\r\n \"x\": -260,\r\n \"y\": -250\r\n }\r\n }\r\n },\r\n \"event\": \"cell:change:position\",\r\n \"options\": {\r\n \"restrict\": null,\r\n \"deep\": true,\r\n \"ui\": true,\r\n \"translateBy\": \"c804c0ab-e687-4ef3-9834-f58ef0062359\",\r\n \"tx\": 10,\r\n \"ty\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n \"userName\": \"xf\"\r\n}", + "messageTemplet": "{{\n var payload = it.payload;\n}}{{~ payload:item}}{{=item.defKey+((item.defKey!=item.defName&&`${item.defName}`)?`[${item.defName}]`:'')}}\n{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_FL_UPDATE", + "opceName": "流程图更新", + "opceIntro": "", + "affectDdl": false, + "orderValue": 33, + "dataSample": "{\r\n \"ctId\": \"3DE06969-3A2A-4717-9DE6-7CA47A733C59\",\r\n \"event\": \"MOP_DIAGRAM_FL_UPDATE\",\r\n \"payload\": [\r\n {\r\n \"diagramId\": \"P0423.B01.V0DH493V4802\",\r\n \"defName\": \"asadasd\",\r\n \"defKey\": \"asadasd\",\r\n \"type\": \"F\",\r\n \"data\": \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n\"\r\n }\r\n ],\r\n \"userName\": \"xf\"\r\n}", + "messageTemplet": "{{\n var payload = it.payload;\n}}{{~ payload:item}}{{=item.defKey+((item.defKey!=item.defName&&`${item.defName}`)?`[${item.defName}]`:'')}}\n{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_MER_UPDATE", + "opceName": "Mermaid图更新", + "opceIntro": "", + "affectDdl": false, + "orderValue": 45, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_DIAGRAM_MM_SETTING", + "opceName": "思维导图设置", + "opceIntro": "", + "affectDdl": false, + "orderValue": 34, + "dataSample": "{\r\n \"__type\": \"SEND_EXEC\",\r\n \"ctId\": \"C8D737C2-3A97-466C-9A3B-ED1741023CE4\",\r\n \"event\": \"MOP_DIAGRAM_MM_SETTING\",\r\n \"payload\": {\r\n \"id\": \"P0423.B01.V0DH493V4803\",\r\n \"defName\": \"asd\",\r\n \"defKey\": \"asd\",\r\n \"type\": \"M\",\r\n \"data\": {\r\n \"theme\": \"shallowSea\"\r\n }\r\n },\r\n \"userName\": \"xf\"\r\n}", + "messageTemplet": "{{\n var item = it.payload;\n}}{{=item.defKey+((item.defKey!=item.defName&&`${item.defName}`)?`[${item.defName}]`:'')}}" + }, + { + "opceKey": "MOP_DIAGRAM_MM_UPDATE", + "opceName": "思维导图更新", + "opceIntro": "", + "affectDdl": false, + "orderValue": 32, + "dataSample": "{\r\n \"ctId\": \"926DC815-6637-4339-AC47-FEF087B379EF\",\r\n \"event\": \"MOP_DIAGRAM_MM_UPDATE\",\r\n \"payload\": [\r\n {\r\n \"diagramId\": \"P0423.B01.V0DH493V4803\",\r\n \"defName\": \"asd\",\r\n \"defKey\": \"asd\",\r\n \"type\": \"M\",\r\n \"data\": [\r\n {\r\n \"action\": \"update\",\r\n \"oldData\": {\r\n \"isRoot\": true,\r\n \"data\": {\r\n \"text\": \"

根节点

\",\r\n \"uid\": \"F95EA6F6-9609-43F5-9B02-C43FDE61840D\",\r\n \"expand\": true,\r\n \"richText\": true,\r\n \"isActive\": false\r\n },\r\n \"children\": []\r\n },\r\n \"data\": {\r\n \"isRoot\": true,\r\n \"data\": {\r\n \"text\": \"

根节点

\",\r\n \"uid\": \"F95EA6F6-9609-43F5-9B02-C43FDE61840D\",\r\n \"expand\": true,\r\n \"richText\": true,\r\n \"isActive\": false\r\n },\r\n \"children\": [\r\n {\r\n \"isRoot\": false,\r\n \"data\": {\r\n \"text\": \"

二级节点

\",\r\n \"uid\": \"4b9a0f83-97f8-46fe-8655-89f2ef0cb66a\",\r\n \"expand\": true,\r\n \"richText\": true,\r\n \"isActive\": false\r\n },\r\n \"children\": []\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n \"userName\": \"xf\"\r\n}", + "messageTemplet": "{{\n var payload = it.payload;\n}}{{~ payload:item}}{{=item.defKey}}[{{=item.defName}}]\n{{~}}" + }, + { + "opceKey": "MOP_DIAGRAM_SETTING", + "opceName": "关系图设置", + "opceIntro": "", + "affectDdl": false, + "orderValue": 25, + "dataSample": "{\r\n \"ctId\": \"AD50E69E-FCC6-4F0F-B0FC-0B5E294218E6\",\r\n \"event\": \"MOP_DIAGRAM_SETTING\",\r\n \"payload\": {\r\n \"data\": {\r\n \"entityDisplay\": {\r\n \"showFields\": [\r\n \"defKey\",\r\n \"defName\"\r\n ],\r\n \"logicModelCompactShow\": \"N-名称/K-代码\",\r\n \"logicModelCompactDelimiter\": \",\"\r\n },\r\n \"entitySetting\": {\r\n \"titleText\": {\r\n \"customValue\": \"{defName}[{defKey}]\",\r\n \"optionValue\": \"C\"\r\n },\r\n \"titleStyle\": {\r\n \"body\": {\r\n \"fill\": \"rgb(183,185,189)\",\r\n \"fill-opacity\": 1\r\n },\r\n \"text\": {\r\n \"fill\": \"rgb(52, 124, 212)\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"Arial\",\r\n \"textAnchor\": \"middle\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n },\r\n \"contentStyle\": {\r\n \"body\": {\r\n \"fill\": \"rgb(183,185,189)\",\r\n \"fill-opacity\": 1\r\n },\r\n \"text\": {\r\n \"fill\": \"\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"Arial\",\r\n \"textAnchor\": \"middle\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n },\r\n \"primaryKeyStyle\": {\r\n \"body\": {\r\n \"fill\": \"rgb(183,185,189)\",\r\n \"fill-opacity\": 1\r\n },\r\n \"text\": {\r\n \"fill\": \"rgb(116, 212, 151)\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"Arial\",\r\n \"textAnchor\": \"middle\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n },\r\n \"foreignKeyStyle\": {\r\n \"body\": {\r\n \"fill\": \"rgb(183,185,189)\",\r\n \"fill-opacity\": 1\r\n },\r\n \"text\": {\r\n \"fill\": \"rgb(249, 186, 80)\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"Arial\",\r\n \"textAnchor\": \"middle\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n },\r\n \"fieldStyle\": {\r\n \"body\": {\r\n \"fill\": \"rgb(183,185,189)\",\r\n \"fill-opacity\": 1\r\n },\r\n \"text\": {\r\n \"fill\": \"\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"Arial\",\r\n \"textAnchor\": \"middle\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n },\r\n \"borderStyle\": {\r\n \"body\": {\r\n \"stroke\": \"rgb(255, 137, 175)\",\r\n \"stroke-width\": 4,\r\n \"stroke-opacity\": 0.78695652173913,\r\n \"stroke-dasharray\": \"0\"\r\n }\r\n },\r\n \"divideLineStyle\": {\r\n \"body\": {\r\n \"stroke\": \"rgb(154, 72, 199)\",\r\n \"stroke-width\": 3,\r\n \"stroke-opacity\": 0.78695652173913,\r\n \"stroke-dasharray\": \"0\"\r\n }\r\n }\r\n },\r\n \"shapeGeneral\": {\r\n \"body\": {\r\n \"fill\": \"rgb(51, 153, 108)\",\r\n \"stroke\": \"rgb(117, 190, 250)\",\r\n \"fill-opacity\": 1,\r\n \"stroke-width\": 3,\r\n \"stroke-opacity\": 0.78695652173913,\r\n \"stroke-dasharray\": \"0\"\r\n },\r\n \"text\": {\r\n \"fill\": \"rgb(116, 212, 151)\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"思源黑体,\",\r\n \"textAnchor\": \"middle\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n },\r\n \"linkLine\": {\r\n \"body\": {\r\n \"fill\": \"rgb(183,185,189)\",\r\n \"stroke\": \"rgb(211, 122, 17)\",\r\n \"fill-opacity\": 1,\r\n \"stroke-width\": 3,\r\n \"stroke-opacity\": 0.78695652173913,\r\n \"stroke-dasharray\": \"0\"\r\n },\r\n \"text\": {\r\n \"fill\": \"\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"思源黑体,\",\r\n \"textAnchor\": \"middle\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n },\r\n \"textbox\": {\r\n \"body\": {\r\n \"fill\": \"rgb(183,185,189)\",\r\n \"fill-opacity\": 1\r\n },\r\n \"text\": {\r\n \"fill\": \"rgb(183, 185, 189)\",\r\n \"fontSize\": \"12\",\r\n \"font-style\": \"italic\",\r\n \"fontFamily\": \"Arial\",\r\n \"textAnchor\": \"start\",\r\n \"font-weight\": \"bold\",\r\n \"text-decoration\": \"underline\",\r\n \"textVerticalAnchor\": \"middle\"\r\n }\r\n }\r\n },\r\n \"type\": \"P\",\r\n \"defName\": \"物理模型ER图\",\r\n \"defKey\": \"dorm.p\",\r\n \"id\": \"P0297.B01.3NK4O2KEGMAA\"\r\n },\r\n \"timestamp\": \"1715822848893\",\r\n \"userName\": \"admin\",\r\n \"status\": \"SEND\",\r\n \"userId\": \"BREU3SAEM7AAB\"\r\n}", + "messageTemplet": "{{\n var item = it.payload;\n}}{{=item.defKey+((item.defKey!=item.defName&&`${item.defName}`)?`[${item.defName}]`:'')}}" + }, + { + "opceKey": "MOP_DIAGRAM_UPDATE", + "opceName": "关系图修改", + "opceIntro": "", + "affectDdl": false, + "orderValue": 21, + "dataSample": "{\r\n \"ctId\": \"8E23D910-802E-4DFA-B67D-3A583B7DDCB0\",\r\n \"event\": \"MOP_DIAGRAM_UPDATE\",\r\n \"payload\": [\r\n {\r\n \"hierarchyType\": \"TREE\",\r\n \"pre\": {\r\n \"id\": \"P0276.B01.BRP47MFBMBEAF\",\r\n \"from\": \"P0276.B01.BRP47MFBMBEAD\",\r\n \"type\": \"peer\",\r\n \"position\": \"before\",\r\n \"data\": {\r\n \"id\": \"P0276.B01.BRP47MFBMBEAF\",\r\n \"type\": \"L\",\r\n \"defKey\": \"CRSE_CORE\",\r\n \"defName\": \"教学选课逻辑模型图\",\r\n \"intro\": null,\r\n \"entityRelationRank\": \"F\",\r\n \"mark\": null,\r\n \"props\": null,\r\n \"cellsData\": null,\r\n \"parentId\": \"P0276.B01.BRPLUMHV4BUAC\",\r\n \"nodeType\": \"diagram\",\r\n \"draggable\": false\r\n }\r\n },\r\n \"next\": {\r\n \"id\": \"P0276.B01.BRP47MFBMBEAF\",\r\n \"from\": \"P0276.B01.BRP47MFBMBEAF\",\r\n \"to\": \"P0276.B01.BRPLUMHV4BUAC\",\r\n \"type\": \"sub\",\r\n \"data\": {\r\n \"defKey\": \"CRSE_CORE\",\r\n \"defName\": \"教学选课逻辑模型\",\r\n \"intro\": \"\",\r\n \"type\": \"L\"\r\n }\r\n }\r\n }\r\n ],\r\n \"timestamp\": \"1714011727376\",\r\n \"userName\": \"admin\",\r\n \"status\": \"SEND\",\r\n \"userId\": \"BREU3SAEM7AAB\"\r\n}", + "messageTemplet": "{{\n var payload = it.payload;\n}}{{~ payload:item}}{{\n var pre = item.pre;\n var next = item.next;\n var preDefKey = pre.data.defKey;\n var preDefName = pre.data.defName;\n var preIntro = pre.data.intro;\n var nextDefKey = next.data.defKey;\n var nextDefName = next.data.defName;\n var nextIntro = next.data.intro;\n}}{{? pre.data.type === \"C\"}}概念模型图{{?? pre.data.type === \"L\"}}逻辑模型图{{?? pre.data.type === \"P\"}}物理模型图{{?? pre.data.type === \"F\"}}流程图{{?? pre.data.type === \"M\"}}思维导图{{?}} {{=nextDefName}}{{? nextDefName !== nextDefKey && nextDefKey !== \"\"}}({{=nextDefKey}}){{?}} {{{? preDefKey !== nextDefKey}}代码:{{? preDefKey === \"\" || preDefKey === null}}<空>{{??}}{{=preDefKey}}{{?}} -> {{? nextDefKey === \"\" || nextDefKey === null}}<空>{{??}}{{=nextDefKey}}{{?}}; {{?}}{{? preDefName !== nextDefName}}名称:{{? preDefName === \"\" || preDefName === null}}<空>{{??}}{{=preDefName}}{{?}} -> {{? nextDefName === \"\" || nextDefName === null}}<空>{{??}}{{=nextDefName}}{{?}}; {{?}}{{? preIntro !== nextIntro}}注释:{{? preIntro === \"\" || preIntro === null}}<空>{{??}}{{=preIntro}}{{?}} -> {{? nextIntro === \"\" || nextIntro === null}}<空>{{??}}{{=nextIntro}}{{?}}{{?}}}\n{{~}}" + }, + { + "opceKey": "MOP_ENTITY_BATCH_ADJUST", + "opceName": "实体批量调整", + "opceIntro": "", + "affectDdl": false, + "orderValue": 37, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_ENTITY_BATCH_REFERS", + "opceName": "实体批量引用设置", + "opceIntro": "", + "affectDdl": false, + "orderValue": 48, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_ENTITY_CATEGORY_CHANGE", + "opceName": "实体改目录", + "opceIntro": "", + "affectDdl": false, + "orderValue": 35, + "dataSample": " {\n \"ctId\": \"FB084840-D994-469D-AFB2-9B33E99B6304\",\n \"event\": \"MOP_ENTITY_CATEGORY_CHANGE\",\n \"payload\": [\n {\n \"hierarchyType\": \"TREE\",\n \"pre\": {\n \"data\": {\n \"defKey\": \"categories_257\",\n \"defName\": null\n },\n \"id\": \"P0423.B01.V0D6C02D480K\",\n \"from\": null,\n \"position\": null,\n \"type\": \"sub\",\n \"entityType\": \"P\"\n },\n \"next\": {\n \"data\": {\n \"defKey\": \"categories_257\",\n \"defName\": null\n },\n \"id\": \"P0423.B01.V0D6C02D480K\",\n \"from\": null,\n \"to\": \"P0423.B01.V0021SND4800\",\n \"type\": \"sub\",\n \"entityType\": \"P\"\n }\n }\n ],\n \"userName\": \"xf\"\n}\n", + "messageTemplet": "" + }, + { + "opceKey": "MOP_ENTITY_CREATE", + "opceName": "实体创建", + "opceIntro": "", + "affectDdl": true, + "orderValue": 8, + "dataSample": "{\n \"ctId\": \"6A369559-729A-44D3-98EC-F30D1C67A403\",\n \"event\": \"MOP_ENTITY_CREATE\",\n \"payload\": [\n {\n \"type\": \"sub\",\n \"to\": \"P0303.B01.3OJXVDG4HQAB\",\n \"position\": null,\n \"data\": [\n {\n \"id\": \"P0276.B01.3OKNELPYGIAA\",\n \"defKey\": \"SIMS_CLASS\",\n \"defName\": \"班级\",\n \"intro\": \"这是班级物理模型\",\n \"type\": \"P\"\n }\n ],\n \"hierarchyType\": \"TREE\"\n }\n ],\n \"timestamp\": \"1715940400705\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:item}}{{\n var data = item.data;\n}}{{~ data:item}}{{? item.type === \"C\"}}概念模型{{?? item.type === \"L\"}}逻辑模型{{?? item.type === \"P\"}}物理模型{{?? item.type === \"V\"}}视图{{?}} {{=item.defName}}{{? item.defKey !== item.defName && item.defKey !== \"\"}}({{=item.defKey}}){{?}}{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_ENTITY_DELETE", + "opceName": "实体删除", + "opceIntro": "", + "affectDdl": true, + "orderValue": 10, + "dataSample": "{\n \"ctId\": \"7A6EA145-948A-4B3D-B4D1-DFF808435A57\",\n \"event\": \"MOP_ENTITY_DELETE\",\n \"payload\": [\n {\n \"from\": \"P0303.B01.3OKGS7IMEEAA\",\n \"type\": \"peer\",\n \"position\": \"after\",\n \"data\": {\n \"id\": \"P0303.B01.3OKNELPYGIAA\",\n \"type\": \"P\",\n \"defKey\": \"SIMS_TEACHER\",\n \"defName\": \"教师\",\n \"intro\": \"这是教师信息表\",\n \"schemaName\": null,\n \"props\": null,\n \"mark\": null,\n \"attr1\": null,\n \"attr2\": null,\n \"attr3\": null,\n \"attr4\": null,\n \"attr5\": null,\n \"attr6\": null,\n \"attr7\": null,\n \"attr8\": null,\n \"attr9\": null,\n \"attr10\": null,\n \"attr11\": null,\n \"attr12\": null,\n \"attr13\": null,\n \"attr14\": null,\n \"attr15\": null,\n \"attr16\": null,\n \"attr17\": null,\n \"attr18\": null,\n \"attr19\": null,\n \"attr20\": null,\n \"fields\": [\n\n ],\n \"correlations\": null,\n \"indexes\": [\n\n ],\n \"nodeType\": \"entity\",\n \"draggable\": true\n }\n }\n ],\n \"timestamp\": \"1715940550269\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{\n var payload = it.payload;\n}}{{~ payload:item}}{{? item.data.type === \"C\"}}概念模型{{?? item.data.type === \"L\"}}逻辑模型{{?? item.data.type === \"P\"}}物理模型{{?? item.data.type === \"V\"}}视图{{?}} {{=item.data.defName}}{{? item.data.defKey !== item.data.defName && item.data.defKey !== \"\"}}({{=item.data.defKey}}){{?}}\n{{~}}\n" + }, + { + "opceKey": "MOP_ENTITY_DRAG", + "opceName": "实体拖动", + "opceIntro": "", + "affectDdl": false, + "orderValue": 11, + "dataSample": "{\n \"ctId\": \"253E79CD-A692-456E-A62B-47430A0461C8\",\n \"event\": \"MOP_ENTITY_DRAG\",\n \"payload\": [\n {\n \"pre\": {\n \"from\": \"P0303.B01.3OJXVDG4HQAB\",\n \"type\": \"sub\",\n \"position\": null\n },\n \"next\": {\n \"from\": \"P0303.B01.3OKNELPYGIAA\",\n \"to\": \"P0303.B01.3OJF6U2AGIAA\",\n \"type\": \"sub\",\n \"data\": {\n \"id\": \"P0303.B01.3OKNELPYGIAA\",\n \"type\": \"P\",\n \"defKey\": \"SIMS_TEACHER\",\n \"defName\": \"教师\",\n \"intro\": \"这是教师信息表\",\n \"schemaName\": null,\n \"props\": null,\n \"mark\": null,\n \"attr1\": null,\n \"attr2\": null,\n \"attr3\": null,\n \"attr4\": null,\n \"attr5\": null,\n \"attr6\": null,\n \"attr7\": null,\n \"attr8\": null,\n \"attr9\": null,\n \"attr10\": null,\n \"attr11\": null,\n \"attr12\": null,\n \"attr13\": null,\n \"attr14\": null,\n \"attr15\": null,\n \"attr16\": null,\n \"attr17\": null,\n \"attr18\": null,\n \"attr19\": null,\n \"attr20\": null,\n \"fields\": [\n\n ],\n \"correlations\": null,\n \"indexes\": [\n\n ],\n \"parentId\": \"P0303.B01.3OJXVDG4HQAB\",\n \"nodeType\": \"entity\",\n \"draggable\": true\n }\n },\n \"hierarchyType\": \"TREE\"\n }\n ],\n \"timestamp\": \"1715940524701\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:item}}{{\n var data = item.next.data;\n}}{{? data.type === \"C\"}}概念模型{{?? data.type === \"L\"}}逻辑模型{{?? data.type === \"P\"}}物理模型{{?? data.type === \"V\"}}视图{{?}} {{=data.defName}}{{? data.defKey !== data.defName && data.defKey !== \"\"}}({{=data.defKey}}){{?}}\n{{~}}" + }, + { + "opceKey": "MOP_ENTITY_UPDATE", + "opceName": "实体修改", + "opceIntro": "", + "affectDdl": true, + "orderValue": 9, + "dataSample": "{\n \"ctId\": \"3CC4BF16-B557-4DBF-AFA5-CB37960F2D44\",\n \"event\": \"MOP_ENTITY_UPDATE\",\n \"payload\": [\n {\n \"hierarchyType\": \"TREE\",\n \"pre\": {\n \"id\": \"P0303.B01.3OKNELPYGIAA\",\n \"from\": \"P0303.B01.3OJXVDG4HQAB\",\n \"type\": \"sub\",\n \"position\": null,\n \"data\": {\n \"id\": \"P0303.B01.3OKNELPYGIAA\",\n \"type\": \"P\",\n \"defKey\": \"SIMS_CLASS\",\n \"defName\": \"班级\",\n \"intro\": \"这是班级物理模型\",\n \"schemaName\": null,\n \"props\": null,\n \"mark\": null,\n \"attr1\": null,\n \"attr2\": null,\n \"attr3\": null,\n \"attr4\": null,\n \"attr5\": null,\n \"attr6\": null,\n \"attr7\": null,\n \"attr8\": null,\n \"attr9\": null,\n \"attr10\": null,\n \"attr11\": null,\n \"attr12\": null,\n \"attr13\": null,\n \"attr14\": null,\n \"attr15\": null,\n \"attr16\": null,\n \"attr17\": null,\n \"attr18\": null,\n \"attr19\": null,\n \"attr20\": null,\n \"fields\": [\n\n ],\n \"correlations\": null,\n \"indexes\": [\n\n ],\n \"parentId\": \"P0303.B01.3OJXVDG4HQAB\",\n \"nodeType\": \"entity\",\n \"draggable\": true\n }\n },\n \"next\": {\n \"id\": \"P0303.B01.3OKNELPYGIAA\",\n \"from\": \"P0303.B01.3OKNELPYGIAA\",\n \"to\": \"P0303.B01.3OJXVDG4HQAB\",\n \"type\": \"sub\",\n \"data\": {\n \"defKey\": \"SIMS_TEACHER\",\n \"defName\": \"教师\",\n \"intro\": \"这是教师信息表\",\n \"type\": \"P\"\n }\n }\n }\n ],\n \"timestamp\": \"1715940486039\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{\n var payload = it.payload;\n}}{{~ payload:item}}{{\n var pre = item.pre;\n var next = item.next;\n var preDefKey = pre.data.defKey;\n var preDefName = pre.data.defName;\n var preIntro = pre.data.intro;\n var nextDefKey = next.data.defKey;\n var nextDefName = next.data.defName;\n var nextIntro = next.data.intro;\n}}{{? pre.data.type === \"C\"}}概念模型{{?? pre.data.type === \"L\"}}逻辑模型{{?? pre.data.type === \"P\"}}物理模型{{?? pre.data.type === \"V\"}}基本模型{{?}} {{=nextDefName}}{{? nextDefName !== nextDefKey && nextDefKey !== \"\"}}({{=nextDefKey}}){{?}} {{{? preDefKey !== nextDefKey}}代码:{{? preDefKey === \"\" || preDefKey === null}}<空>{{??}}{{=preDefKey}}{{?}} -> {{? nextDefKey === \"\" || nextDefKey === null}}<空>{{??}}{{=nextDefKey}}{{?}}; {{?}}{{? preDefName !== nextDefName}}名称:{{? preDefName === \"\" || preDefName === null}}<空>{{??}}{{=preDefName}}{{?}} -> {{? nextDefName === \"\" || nextDefName === null}}<空>{{??}}{{=nextDefName}}{{?}}; {{?}}{{? preIntro !== nextIntro}}注释:{{? preIntro === \"\" || preIntro === null}}<空>{{??}}{{=preIntro}}{{?}} -> {{? nextIntro === \"\" || nextIntro === null}}<空>{{??}}{{=nextIntro}}{{?}}{{?}}}\n{{~}}" + }, + { + "opceKey": "MOP_FIELD_AUTO_MATCH_STND", + "opceName": "智能贯标", + "opceIntro": "模糊匹配/AI匹配/老项目匹配", + "affectDdl": false, + "orderValue": 43, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_FIELD_CREATE", + "opceName": "字段创建", + "opceIntro": "", + "affectDdl": true, + "orderValue": 12, + "dataSample": "{\n \"ctId\": \"07CFAA4D-3803-4AA3-AEF7-63698DF7C0D7\",\n \"event\": \"MOP_FIELD_CREATE\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLAGE\",\n \"step\": 0,\n \"data\": [\n {\n \"id\": \"P0276.B01.3OTBMNNMEMAB\",\n \"defKey\": \"COLLEGE_ID\",\n \"defName\": \"学院ID\",\n \"intro\": \"\",\n \"baseDataType\": \"\",\n \"bizDomainType\": \"\",\n \"dbDataType\": \"\",\n \"dataLen\": \"\",\n \"numScale\": \"\",\n \"primaryKey\": 0,\n \"notNull\": 0,\n \"autoIncrement\": 0,\n \"defaultValue\": \"\",\n \"stndDictId\": \"\",\n \"stndFieldId\": \"\",\n \"attr1\": \"\",\n \"attr2\": \"\",\n \"attr3\": \"\",\n \"attr4\": \"\",\n \"attr5\": \"\",\n \"attr6\": \"\",\n \"attr7\": \"\",\n \"attr8\": \"\",\n \"attr9\": \"\",\n \"attr10\": \"\",\n \"attr11\": \"\",\n \"attr12\": \"\",\n \"attr13\": \"\",\n \"attr14\": \"\",\n \"attr15\": \"\",\n \"attr16\": \"\",\n \"attr17\": \"\",\n \"attr18\": \"\",\n \"attr19\": \"\",\n \"attr20\": \"\",\n \"origin\": \"UI\"\n }\n ]\n }\n ],\n \"timestamp\": \"1716012632510\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:payload}}{{\n var data = payload.data;\n var entityType = payload.entityType;\n var entityDefKey = payload.defKey;\n var entityDefName = payload.defName;\n}}{{~ data:item}}{{\n var defKey = item.defKey;\n var defName = item.defName;\n}}{{? entityType === \"C\"}}概念模型{{?? entityType === \"L\"}}逻辑模型{{?? entityType === \"P\"}}物理模型{{?? entityType === \"V\"}}视图{{?}} {{=entityDefName}}{{? entityDefName !== entityDefKey && entityDefKey !== \"\"}}({{=entityDefKey}}){{?}} {{=defName}}{{? defName !== defKey && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_FIELD_DELETE", + "opceName": "字段删除", + "opceIntro": "", + "affectDdl": true, + "orderValue": 14, + "dataSample": "{\n \"ctId\": \"98A98F07-2A55-42A0-9CA3-BB7F4AF1FC39\",\n \"event\": \"MOP_FIELD_DELETE\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLAGE\",\n \"data\": [\n {\n \"id\": \"P0276.B01.3OTBMNNMEMAC\",\n \"defKey\": \"COLLEGE_NAME\",\n \"defName\": \"学院名称\",\n \"intro\": \"\",\n \"baseDataType\": \"\",\n \"bizDomainType\": \"\",\n \"dbDataType\": \"\",\n \"dataLen\": \"\",\n \"numScale\": \"\",\n \"primaryKey\": 0,\n \"notNull\": 0,\n \"autoIncrement\": 0,\n \"defaultValue\": \"\",\n \"stndDictId\": \"\",\n \"stndFieldId\": \"\",\n \"attr1\": \"\",\n \"attr2\": \"\",\n \"attr3\": \"\",\n \"attr4\": \"\",\n \"attr5\": \"\",\n \"attr6\": \"\",\n \"attr7\": \"\",\n \"attr8\": \"\",\n \"attr9\": \"\",\n \"attr10\": \"\",\n \"attr11\": \"\",\n \"attr12\": \"\",\n \"attr13\": \"\",\n \"attr14\": \"\",\n \"attr15\": \"\",\n \"attr16\": \"\",\n \"attr17\": \"\",\n \"attr18\": \"\",\n \"attr19\": \"\",\n \"attr20\": \"\",\n \"origin\": \"UI\"\n }\n ]\n }\n ],\n \"timestamp\": \"1716012817205\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:payload}}{{\n var data = payload.data;\n var entityType = payload.entityType;\n var entityDefKey = payload.defKey;\n var entityDefName = payload.defName;\n}}{{~ data:item}}{{\n var defKey = item.defKey;\n var defName = item.defName;\n}}{{? entityType === \"C\"}}概念模型{{?? entityType === \"L\"}}逻辑模型{{?? entityType === \"P\"}}物理模型{{?? entityType === \"V\"}}视图{{?}} {{=entityDefName}}{{? entityDefName !== entityDefKey && entityDefKey !== \"\"}}({{=entityDefKey}}){{?}} {{=defName}}{{? defKey !== defName && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_FIELD_DRAG", + "opceName": "字段拖动", + "opceIntro": "", + "affectDdl": false, + "orderValue": 15, + "dataSample": "{\n \"ctId\": \"910FD4C7-D38B-46D4-AE11-9D9B8AB49340\",\n \"event\": \"MOP_FIELD_DRAG\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLAGE\",\n \"step\": -1,\n \"data\": [\n {\n \"id\": \"P0276.B01.3OTBMNNMEMAC\",\n \"defKey\": \"COLLEGE_NAME\",\n \"defName\": \"学院名称\"\n }\n ]\n }\n ],\n \"timestamp\": \"1716012781175\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:payload}}{{\n var data = payload.data;\n var entityType = payload.entityType;\n var entityDefName = payload.defName;\n var entityDefKey = payload.defKey;\n}}{{~ data:item}}{{\n var defKey = item.defKey;\n var defName = item.defName;\n}}{{? entityType === \"C\"}}概念模型{{?? entityType === \"L\"}}逻辑模型{{?? entityType === \"P\"}}物理模型{{?? entityType === \"V\"}}视图{{?}} {{=entityDefName}}{{? entityDefName !== entityDefKey && entityDefKey !== \"\"}}({{=entityDefKey}}){{?}} {{=defName}}{{? defKey !== defName && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_FIELD_UPDATE", + "opceName": "字段修改", + "opceIntro": "", + "affectDdl": true, + "orderValue": 13, + "dataSample": "{\n \"ctId\": \"AD94C1D4-47F3-47B0-AC4B-93C45103E49F\",\n \"event\": \"MOP_FIELD_UPDATE\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLAGE\",\n \"data\": [\n {\n \"id\": \"P0276.B01.3OTBMNNMEMAB\",\n \"defKey\": \"COLLEGE_ID\",\n \"defName\": \"学院ID\",\n \"updateKeys\": \"defName,\",\n \"pre\": {\n \"defName\": \"\"\n },\n \"next\": {\n \"defName\": \"学院ID\"\n }\n }\n ]\n }\n ],\n \"timestamp\": \"1716012694301\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{\n var keyMap = {\n \"defKey\":\"代码\",\n \"defName\":\"名称\",\n \"bizDomainType\":\"业务域类型\",\n \"baseDataType\":\"基本数据类型\",\n \"dbDataType\":\"数据库数据类型\",\n \"dataLen\":\"长度\",\n \"numScale\":\"小数\",\n \"primaryKey\":\"主键\",\n \"notNull\":\"非空\",\n \"autoIncrement\":\"自增\",\n \"intro\": \"备注\",\n \"stndComplianceLevel\":\"贯标等级\",\n \"stndComplianceType\":\"贯标要求\",\n \"stndDictId\":\"代码值标准\",\n \"stndDictKey\":\"代码值标准\",\n \"stndFieldId\":\"数据项标准\",\n \"stndFieldKey\":\"数据项标准\"\n \n };\n}}{{~it.payload:payload}}{{\n var data = payload.data;\n}}{{~ data:item}}{{\n var defKey = item.defKey;\n var defName = item.defName;\n var pre = item.pre;\n var next = item.next;\n var updateKeys = item.updateKeys.split(\",\").filter(key => key !== \"\");\n}}{{? payload.entityType === \"C\"}}概念模型{{?? payload.entityType === \"L\"}}逻辑模型{{?? payload.entityType === \"P\"}}物理模型{{?? payload.entityType === \"V\"}}视图{{?}} {{=payload.defName}}{{? payload.defName !== payload.defKey && payload.defKey !== \"\"}}({{=`${payload.defKey}.${defKey}`}}){{?}} {{? pre !== next}}{{{~updateKeys:updateKey}}{{=keyMap[updateKey]}}:{{? pre[updateKey] === \"\" || pre[updateKey] === null}}<空>{{??}}{{=pre[updateKey]}}{{?}} -> {{? next[updateKey] === \"\" || next[updateKey] === null}}<空>{{??}}{{=next[updateKey]}}{{?}}{{=updateKeys.length > 1 ? \", \" : \"\"}}{{~}}}{{?}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_INDEX_CREATE", + "opceName": "索引创建", + "opceIntro": "", + "affectDdl": true, + "orderValue": 16, + "dataSample": "{\n \"ctId\": \"1E068338-1F1D-4B6F-A10A-14CB49908F46\",\n \"event\": \"MOP_INDEX_CREATE\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLEGE\",\n \"step\": 0,\n \"data\": [\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAA\",\n \"type\": \"\",\n \"defKey\": \"\",\n \"defName\": \"\",\n \"intro\": \"\",\n \"fields\": [\n\n ]\n }\n ]\n }\n ],\n \"timestamp\": \"1716015116520\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:payload}}{{\n var data = payload.data;\n var entityType = payload.entityType;\n var entityDefKey = payload.defKey;\n var entityDefName = payload.defName;\n}}{{~ data:item}}{{\n var defKey = item.defKey;\n var defName = item.defName;\n}}{{? entityType === \"C\"}}概念模型{{?? entityType === \"L\"}}逻辑模型{{?? payload.entityType === \"P\"}}物理模型{{?? payload.entityType === \"V\"}}视图{{?}} {{=entityDefName}}{{? entityDefName !== entityDefKey && entityDefKey !== \"\"}}({{=entityDefKey}}){{?}} {{? defName === \"\" || defName === undefined}}<空>{{??}}{{=defName}}{{?}}{{? defName !== defKey && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_INDEX_DELETE", + "opceName": "索引删除", + "opceIntro": "", + "affectDdl": true, + "orderValue": 18, + "dataSample": "{\n \"ctId\": \"2D5B5945-301D-4AE8-8773-B59C7C9B7F61\",\n \"event\": \"MOP_INDEX_DELETE\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLEGE\",\n \"data\": [\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAD\",\n \"type\": \"\",\n \"defKey\": \"\",\n \"defName\": \"\",\n \"intro\": \"\",\n \"fields\": [\n\n ]\n },\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAA\",\n \"type\": \"UNIQUE\",\n \"defKey\": \"ID\",\n \"defName\": \"\",\n \"intro\": \"\",\n \"fields\": [\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAB\",\n \"fieldId\": \"P0303.B01.3OTBMNNMEMAB\",\n \"fieldDefKey\": \"COLLEGE_ID\",\n \"sortType\": \"DESC\"\n },\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAC\",\n \"fieldId\": \"P0303.B01.3OTJCCQYEMAA\",\n \"fieldDefKey\": \"COLLEGE_NAME\",\n \"sortType\": \"ASC\"\n }\n ]\n }\n ]\n }\n ],\n \"timestamp\": \"1716015395198\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:payload}}{{\n var data = payload.data;\n var entityType = payload.entityType;\n var entityDefKey = payload.defKey;\n var entityDefName = payload.defName;\n}}{{~ data:item}}{{\n var defKey = item.defKey;\n var defName = item.defName;\n}}{{? entityType === \"C\"}}概念模型{{?? entityType === \"L\"}}逻辑模型{{?? entityType === \"P\"}}物理模型{{?? entityType === \"V\"}}视图{{?}} {{=entityDefName}}{{? entityDefName !== entityDefKey && entityDefKey !== \"\"}}({{=entityDefKey}}){{?}} {{? defName === \"\" || defName === undefined}}<空>{{??}}{{=defName}}{{?}}{{? defKey !== defName && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_INDEX_DRAG", + "opceName": "索引拖动", + "opceIntro": "", + "affectDdl": false, + "orderValue": 19, + "dataSample": "{\n \"ctId\": \"016735B0-1D2E-4055-9844-AFF07D9B1BD1\",\n \"event\": \"MOP_INDEX_DRAG\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLEGE\",\n \"step\": 1,\n \"data\": [\n {\n\n },\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAA\",\n \"defKey\": \"ID\",\n \"defName\": \"\"\n }\n ]\n }\n ],\n \"timestamp\": \"1716015360047\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{~it.payload:payload}}{{\n var data = payload.data;\n var entityType = payload.entityType;\n var entityDefName = payload.defName;\n var entityDefKey = payload.defKey;\n}}{{~ data:item}}{{\n var defKey = item.defKey;\n var defName = item.defName;\n}}{{? entityType === \"C\"}}概念模型{{?? entityType === \"L\"}}逻辑模型{{?? entityType === \"P\"}}物理模型{{?? entityType === \"V\"}}视图{{?}} {{=entityDefName}}{{? entityDefName !== entityDefKey && entityDefKey !== \"\"}}({{=entityDefKey}}){{?}} {{? defName === \"\" || defName === undefined}}<空>{{??}}{{=defName}}{{?}}{{? defName !== defKey && defKey !== \"\"}}({{=defKey}}){{?}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_INDEX_UPDATE", + "opceName": "索引修改", + "opceIntro": "", + "affectDdl": true, + "orderValue": 17, + "dataSample": "{\n \"ctId\": \"7380D5FD-8A45-4E01-AE00-3157356DE6CE\",\n \"event\": \"MOP_INDEX_UPDATE\",\n \"payload\": [\n {\n \"entityId\": \"P0303.B01.3OTBMNNMEMAA\",\n \"entityType\": \"P\",\n \"defName\": \"学院信息\",\n \"defKey\": \"SMIS_COLLEGE\",\n \"data\": [\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAA\",\n \"defKey\": \"ID\",\n \"defName\": \"\",\n \"updateKeys\": \"fields\",\n \"pre\": {\n \"fields\": [\n\n ]\n },\n \"next\": {\n \"fields\": [\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAB\",\n \"fieldId\": \"P0303.B01.3OTBMNNMEMAB\",\n \"fieldDefKey\": \"COLLEGE_ID\",\n \"sortType\": \"DESC\"\n },\n {\n \"id\": \"P0276.B01.3OTKZ4XQEMAC\",\n \"fieldId\": \"P0303.B01.3OTJCCQYEMAA\",\n \"fieldDefKey\": \"COLLEGE_NAME\",\n \"sortType\": \"ASC\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"timestamp\": \"1716015317967\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n}", + "messageTemplet": "{{\n var keyMap = {\n \"fields\":\"字段\",\n \"type\":\"类型\",\n \"defKey\":\"代码\",\n \"defName\":\"名称\",\n \"intro\":\"注释\"\n };\n}}{{~it.payload:payload}}{{\n var data = payload.data;\n var entityDefKey = payload.defKey;\n var entityDefName = payload.defName;\n var entityType = payload.entityType;\n function convert(arr) {\n return arr.map(item => ({\n fieldDefKey: item.fieldDefKey,\n sortType: item.sortType\n }));\n }\n}}{{~ data:item}}{{\n var indexDefKey = item.defKey;\n var indexDefName = item.defName;\n var updateKeys = item.updateKeys.split(\",\").filter(key => key !== \"\");\n var pre = item.pre;\n var next = item.next;\n}}{{? entityType === \"C\"}}概念模型{{?? entityType === \"L\"}}逻辑模型{{?? entityType === \"P\"}}物理模型{{?? entityType === \"V\"}}视图{{?}} {{=entityDefName}}{{? entityDefName !== entityDefKey && entityDefKey !== \"\"}}({{=entityDefKey}}){{?}} {{? indexDefName === \"\" || indexDefName === undefined}}<空>{{??}}{{=indexDefName}}{{?}}{{? indexDefName !== indexDefKey && indexDefKey !== \"\"}}({{=indexDefKey}}){{?}} {{{~updateKeys:updateKey}}{{=keyMap[updateKey]}}:{{? pre[updateKey].constructor === Array}}{{= JSON.stringify(pre[updateKey])}}{{??}}{{? pre[updateKey] === \"\" || pre[updateKey] === undefined}}<空>{{??}}{{=pre[updateKey]}}{{?}}{{?}} -> {{? next[updateKey].constructor === Array}}{{= JSON.stringify(convert(next[updateKey]))}}{{??}}{{? next[updateKey] === \"\" || next[updateKey] === undefined}}<空>{{??}}{{=next[updateKey]}}{{?}}{{?}}{{=updateKeys.length > 1 ? \", \" : \"\"}}{{~}}}\n{{~}}\n{{~}}" + }, + { + "opceKey": "MOP_PROJECT_HOME_COVER_DIAGRAM", + "opceName": "设置项目封面", + "opceIntro": "", + "affectDdl": false, + "orderValue": 44, + "dataSample": null, + "messageTemplet": "" + }, + { + "opceKey": "MOP_PROJECT_SETTING", + "opceName": "项目设置", + "opceIntro": "", + "affectDdl": true, + "orderValue": 24, + "dataSample": "{\n \"ctId\": \"9569E24B-0D21-4061-8B64-EF83BD4FB3EC\",\n \"event\": \"MOP_PROJECT_SETTING\",\n \"payload\": {\n \"physicEntityPresetFields\": [],\n \"physicEntityAttr\": {\n \"attr9\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 9\n },\n \"attr19\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 19\n },\n \"attr18\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 18\n },\n \"attr17\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 17\n },\n \"attr6\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 6\n },\n \"attr5\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 5\n },\n \"attr16\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 16\n },\n \"attr15\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 15\n },\n \"attr8\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 8\n },\n \"attr7\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 7\n },\n \"attr14\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 14\n },\n \"attr13\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 13\n },\n \"attr2\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 2\n },\n \"attr12\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 12\n },\n \"attr1\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 1\n },\n \"attr4\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 4\n },\n \"attr11\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 11\n },\n \"attr3\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 3\n },\n \"attr10\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 10\n },\n \"attr20\": {\n \"enable\": false,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": 20\n }\n },\n \"physicEntityFieldAttr\": {\n \"attr9\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr19\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr18\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr6\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr17\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr5\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr16\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr8\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr15\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr7\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr14\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr13\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr2\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr12\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr1\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr4\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr11\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr10\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr3\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n },\n \"attr20\": {\n \"enable\": null,\n \"title\": \"\",\n \"editType\": \"SingleText\",\n \"optionsData\": \"\",\n \"optionsFetcher\": \"\",\n \"defaultValue\": \"\",\n \"orderValue\": null,\n \"columnWidth\": null\n }\n },\n \"physicEntityHeader\": {\n \"defKey\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 1\n },\n \"defName\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 2\n },\n \"baseDataType\": {\n \"enable\": 1,\n \"columnWidth\": 200,\n \"orderValue\": 3\n },\n \"bizDomainType\": {\n \"enable\": 1,\n \"columnWidth\": 200,\n \"orderValue\": 4\n },\n \"dbDataType\": {\n \"enable\": 1,\n \"columnWidth\": 200,\n \"orderValue\": 5\n },\n \"dataLen\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 6\n },\n \"numScale\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 7\n },\n \"primaryKey\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 8\n },\n \"notNull\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 9\n },\n \"autoIncrement\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 10\n },\n \"defaultValue\": {\n \"enable\": 1,\n \"columnWidth\": 100,\n \"orderValue\": 11\n },\n \"stndDictKey\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 12\n },\n \"stndFieldKey\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 13\n },\n \"attr1\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 14\n },\n \"attr2\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 15\n },\n \"attr3\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 16\n },\n \"attr4\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 17\n },\n \"attr5\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 18\n },\n \"attr6\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 19\n },\n \"attr7\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 20\n },\n \"attr8\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 21\n },\n \"attr9\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 22\n },\n \"attr10\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 23\n },\n \"attr11\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 24\n },\n \"attr12\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 25\n },\n \"attr13\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 26\n },\n \"attr14\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 27\n },\n \"attr15\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 28\n },\n \"attr16\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 29\n },\n \"attr17\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 30\n },\n \"attr18\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 31\n },\n \"attr19\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 32\n },\n \"attr20\": {\n \"enable\": 0,\n \"columnWidth\": 100,\n \"orderValue\": 33\n }\n }\n },\n \"timestamp\": \"1715823563825\",\n \"userName\": \"admin\",\n \"status\": \"SEND\",\n \"userId\": \"BREU3SAEM7AAB\"\n }\n", + "messageTemplet": "" + } + ] + }, + "project": { + "branch": "master", + "dbDialect": "MySQL", + "schema": null, + "status": "EDIT", + "allow": "W", + "setting": { + "physicEntityPresetFields": [ + { + "id": "BFB2ADBB-B1E9-4963-BD1F-FA9074EFE4AD", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "978353B6-4795-4D07-9651-B20E4ED64C33", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "89526ADA-2D33-4B5C-BEE0-CCBD59E9DE33", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "71943ECA-7843-4486-A378-C9F98399799A", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "B1397FFC-5517-42FC-8FD2-6701507784CB", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "C1643BB8-90A0-46DB-8BCD-95A630200AC3", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + } + ], + "physicEntityAttr": { + "attr1": { + "enable": 0, + "title": "增强字段1", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 1 + }, + "attr2": { + "enable": 0, + "title": "增强字段2", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 2 + }, + "attr3": { + "enable": 0, + "title": "增强字段3", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 3 + }, + "attr4": { + "enable": 0, + "title": "增强字段4", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 4 + }, + "attr5": { + "enable": 0, + "title": "增强字段5", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 5 + }, + "attr6": { + "enable": 0, + "title": "增强字段6", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 6 + }, + "attr7": { + "enable": 0, + "title": "增强字段7", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 7 + }, + "attr8": { + "enable": 0, + "title": "增强字段8", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 8 + }, + "attr9": { + "enable": 0, + "title": "增强字段9", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 9 + }, + "attr10": { + "enable": 0, + "title": "增强字段10", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 10 + }, + "attr11": { + "enable": 0, + "title": "增强字段11", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 11 + }, + "attr12": { + "enable": 0, + "title": "增强字段12", + "editType": "MultiText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 12 + }, + "attr13": { + "enable": 0, + "title": "增强字段13", + "editType": "DecimalInput", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 13 + }, + "attr14": { + "enable": 0, + "title": "增强字段14", + "editType": "IntegerInput", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 14 + }, + "attr15": { + "enable": 0, + "title": "增强字段15", + "editType": "MultiTreeSelect", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 15 + }, + "attr16": { + "enable": 0, + "title": "增强字段16", + "editType": "SingleTreeSelect", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 16 + }, + "attr17": { + "enable": 0, + "title": "增强字段17", + "editType": "MultiCheckbox", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 17 + }, + "attr18": { + "enable": 0, + "title": "增强字段18", + "editType": "MultiDropdown", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 18 + }, + "attr19": { + "enable": 0, + "title": "增强字段19", + "editType": "SingleDropdown", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 19 + }, + "attr20": { + "enable": 0, + "title": "增强字段20", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 20 + } + }, + "physicEntityFieldAttr": { + "attr1": { + "enable": 0, + "title": "增强字段1", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 16, + "columnWidth": null + }, + "attr2": { + "enable": 0, + "title": "增强字段2", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 17, + "columnWidth": null + }, + "attr3": { + "enable": 0, + "title": "增强字段3", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 18, + "columnWidth": null + }, + "attr4": { + "enable": 0, + "title": "增强字段4", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 19, + "columnWidth": null + }, + "attr5": { + "enable": 0, + "title": "增强字段5", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 20, + "columnWidth": null + }, + "attr6": { + "enable": 0, + "title": "增强字段6", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 21, + "columnWidth": null + }, + "attr7": { + "enable": 0, + "title": "增强字段7", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 22, + "columnWidth": null + }, + "attr8": { + "enable": 0, + "title": "增强字段8", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 23, + "columnWidth": null + }, + "attr9": { + "enable": 0, + "title": "增强字段9", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 24, + "columnWidth": null + }, + "attr10": { + "enable": 0, + "title": "增强字段10", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 25, + "columnWidth": null + }, + "attr11": { + "enable": 0, + "title": "增强字段11", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 26, + "columnWidth": null + }, + "attr12": { + "enable": 0, + "title": "增强字段12", + "editType": "MultiText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 27, + "columnWidth": null + }, + "attr13": { + "enable": 0, + "title": "增强字段13", + "editType": "DecimalInput", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 28, + "columnWidth": null + }, + "attr14": { + "enable": 0, + "title": "增强字段14", + "editType": "IntegerInput", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 29, + "columnWidth": null + }, + "attr15": { + "enable": 0, + "title": "增强字段15", + "editType": "MultiTreeSelect", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 30, + "columnWidth": null + }, + "attr16": { + "enable": 0, + "title": "增强字段16", + "editType": "SingleTreeSelect", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 31, + "columnWidth": null + }, + "attr17": { + "enable": 0, + "title": "增强字段17", + "editType": "MultiCheckbox", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 32, + "columnWidth": null + }, + "attr18": { + "enable": 0, + "title": "增强字段18", + "editType": "MultiDropdown", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 33, + "columnWidth": null + }, + "attr19": { + "enable": 0, + "title": "增强字段19", + "editType": "SingleDropdown", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 34, + "columnWidth": null + }, + "attr20": { + "enable": 0, + "title": "增强字段20", + "editType": "SingleText", + "optionsData": null, + "optionsFetcher": null, + "defaultValue": null, + "orderValue": 35, + "columnWidth": null + } + }, + "physicEntityHeader": { + "defKey": { + "columnWidth": 210, + "enable": 1, + "orderValue": 1 + }, + "defName": { + "columnWidth": 230, + "enable": 1, + "orderValue": 2 + }, + "dbDataType": { + "columnWidth": 150, + "enable": 1, + "orderValue": 3 + }, + "dataLen": { + "columnWidth": 70, + "enable": 1, + "orderValue": 4 + }, + "numScale": { + "columnWidth": 80, + "enable": 1, + "orderValue": 5 + }, + "defaultValue": { + "columnWidth": 200, + "enable": 1, + "orderValue": 6 + }, + "intro": { + "columnWidth": 300, + "enable": 1, + "orderValue": 7 + }, + "stndDictId": { + "columnWidth": 230, + "enable": 1, + "orderValue": 8 + }, + "primaryKey": { + "columnWidth": 70, + "enable": 1, + "orderValue": 9 + }, + "autoIncrement": { + "columnWidth": 70, + "enable": 1, + "orderValue": 10 + }, + "notNull": { + "columnWidth": 80, + "enable": 1, + "orderValue": 11 + }, + "baseDataType": { + "columnWidth": 150, + "enable": 0, + "orderValue": 12 + }, + "bizDomainType": { + "columnWidth": 180, + "enable": 0, + "orderValue": 13 + }, + "stndFieldId": { + "columnWidth": 230, + "enable": 0, + "orderValue": 14 + }, + "stndComplianceType": { + "columnWidth": 120, + "enable": 0, + "orderValue": 15 + }, + "stndComplianceLevel": { + "columnWidth": 100, + "enable": 0, + "orderValue": 16 + }, + "fieldTier": { + "columnWidth": 100, + "enable": 0, + "orderValue": 17 + }, + "attr1": { + "columnWidth": 100, + "enable": 0, + "orderValue": 18 + }, + "attr2": { + "columnWidth": 100, + "enable": 0, + "orderValue": 19 + }, + "attr3": { + "columnWidth": 100, + "enable": 0, + "orderValue": 20 + }, + "attr4": { + "columnWidth": 100, + "enable": 0, + "orderValue": 21 + }, + "attr5": { + "columnWidth": 100, + "enable": 0, + "orderValue": 22 + }, + "attr6": { + "columnWidth": 100, + "enable": 0, + "orderValue": 23 + }, + "attr7": { + "columnWidth": 100, + "enable": 0, + "orderValue": 24 + }, + "attr8": { + "columnWidth": 100, + "enable": 0, + "orderValue": 25 + }, + "attr9": { + "columnWidth": 100, + "enable": 0, + "orderValue": 26 + }, + "attr10": { + "columnWidth": 100, + "enable": 0, + "orderValue": 27 + }, + "attr11": { + "columnWidth": 100, + "enable": 0, + "orderValue": 28 + }, + "attr12": { + "columnWidth": 100, + "enable": 0, + "orderValue": 29 + }, + "attr13": { + "columnWidth": 100, + "enable": 0, + "orderValue": 30 + }, + "attr14": { + "columnWidth": 100, + "enable": 0, + "orderValue": 31 + }, + "attr15": { + "columnWidth": 100, + "enable": 0, + "orderValue": 32 + }, + "attr16": { + "columnWidth": 100, + "enable": 0, + "orderValue": 33 + }, + "attr17": { + "columnWidth": 100, + "enable": 0, + "orderValue": 34 + }, + "attr18": { + "columnWidth": 100, + "enable": 0, + "orderValue": 35 + }, + "attr19": { + "columnWidth": 100, + "enable": 0, + "orderValue": 36 + }, + "attr20": { + "columnWidth": 100, + "enable": 0, + "orderValue": 37 + } + }, + "fieldTier": [ + { + "defKey": "1", + "sortValue": 0, + "defName": "核心级", + "intro": "业务流程运转关键字段,缺失导致系统功能中断", + "frequency": "90%+ (极高)", + "illustrate": "order_id(主键)、user_id(外键)、amount(金额)、status(状态值)" + }, + { + "defKey": "2", + "sortValue": 1, + "defName": "描述级", + "intro": "实体静态特征描述,支撑业务语义理解与可视化", + "frequency": "60%-80% (高)", + "illustrate": "product_name(名称)、category(分类)、delivery_address(地址)、color_code(颜色编码)" + }, + { + "defKey": "3", + "sortValue": 2, + "defName": "扩展级", + "intro": "低频业务扩展属性,避免核心表频繁变更", + "frequency": "20%-50% (中)", + "illustrate": "config_options(JSON配置)、discounted_price(冗余计算值)" + }, + { + "defKey": "4", + "sortValue": 3, + "defName": "技术级", + "intro": "系统运维元数据,与业务逻辑解耦", + "frequency": "<10% (低)", + "illustrate": "created_by(创建人)、created_at(创建时间)、etl_batch_id(ETL批次号)、source_system(数据源编码)、debug_flag(调试标记)" + }, + { + "defKey": "5", + "sortValue": 4, + "defName": "冗余级", + "intro": "容错与灾备设计,提升系统可靠性", + "frequency": "<5% (极低)", + "illustrate": " data_hash(校验哈希)、is_deleted(软删除标记)、backup_shard_id(灾备分片ID)" + } + ], + "dictExportTpl": [ + { + "defKey": "SQL-INSERT", + "defName": "SQL-INSERT", + "type": "SQL", + "content": "{{~ it.stndDict:dict}}\n--代码对象:{{=dict.defKey}}-{{=dict.defName}}\nINSERT INTO sys_dict(dict_key,dict_name) values('{{=dict.defKey}}','{{=dict.defName}}');\n{{~ dict.dictItems:item}}\nINSERT INTO sys_dict_item(dict_key,item_key,item_name,sort,parent_key,intro) values('{{=dict.defKey}}','{{=item.itemKey}}','{{=item.itemName}}','{{=item.sort||\"\"}}','{{=item.parentKey||\"\"}}','{{=item.intro||\"\"}}');\n{{~}}\n{{~}}" + } + ] + } + }, + "team": { + "dbEnvironments": [ + { + "defKey": "dev", + "defName": "dev", + "dbDialect": "MySQL", + "dbConnections": [ + { + "defName": "多合一", + "usedFor": "ALL_IN_ONE", + "dbDialectKey": "MySQL", + "driverFiles": "mysql-connector-j-8.3.0.jar", + "extParams": "schemaName=njzscloud_chu", + "password": "ZXcgoJqNVcVNLolCmBKQ2A==", + "id": "FCD5D2AF-36D6-4ED7-AAC2-C5F5FB02332A", + "username": "xa1HO8gevrFNnWjL9Bsgnw==", + "driverClassName": "com.mysql.cj.jdbc.Driver", + "url": "YJUIuHpIHkliSUlYOgt+kiXh6RwxUNQlw+q6q7GdYJWfSIlGT6vl9O/L8CBqwS0isOJT4ceQGCDwOXtUNK973MyxN/BcoC56AywnBxQ+4B9otJjgCDXZUIOT+D2p8VDZJvheD39FwaCDvgB8Sqk2s/WTiPkVUWys0eeV5PwGzzI=", + "envId": "572377B5-884E-47DB-835F-6326AB9561C7" + } + ], + "id": "572377B5-884E-47DB-835F-6326AB9561C7" + } + ], + "bizDomainTypes": [] + }, + "user": { + "modelingNavDisplay": { + "hierarchyType": "TREE", + "nodeType": "ALL", + "categoryNode": { + "optionValue": "N", + "customValue": "{defKey}-{defName}", + "orderValue": 0 + }, + "conceptEntityNode": { + "optionValue": "A", + "customValue": "{defKey}-{defName}", + "orderValue": 1 + }, + "logicEntityNode": { + "optionValue": "A", + "customValue": "{defKey}-{defName}", + "orderValue": 2 + }, + "physicEntityNode": { + "optionValue": "A", + "customValue": "{defKey}-{defName}", + "orderValue": 3 + }, + "diagramNode": { + "optionValue": "A", + "customValue": "{defKey}-{defName}", + "orderValue": 4 + } + }, + "freezeEntityHeader": { + "physicEntity": { + "defKey": { + "width": 210, + "fixed": "L" + }, + "defName": { + "width": 166, + "fixed": "L" + }, + "dbDataType": { + "width": 121, + "fixed": "" + }, + "dataLen": { + "width": 70, + "fixed": "" + }, + "numScale": { + "width": 80, + "fixed": "" + }, + "defaultValue": { + "width": 128, + "fixed": "" + }, + "intro": { + "width": 300, + "fixed": "" + }, + "stndDictId": { + "width": 400, + "fixed": "" + }, + "primaryKey": { + "width": 70, + "fixed": "" + }, + "autoIncrement": { + "width": 70, + "fixed": "" + }, + "notNull": { + "width": 80, + "fixed": "R" + } + } + } + } + }, + "project": { + "avatar": "", + "name": "njzscloud-dispose", + "categories": [ + { + "id": "F4D7984D-7AEE-412E-B037-71D50D37B7C6", + "defKey": "sys", + "defName": "系统", + "classifyType": "MANUAL", + "manualClassify": "[\"P\"]", + "bindSchema": 0, + "children": null, + "entityRefs": [ + { + "refObjectId": "8783C5A5-46D1-4CDC-868F-B604C776D114", + "refObjectType": "E", + "orderValue": 1 + }, + { + "refObjectId": "C2604D57-F42D-4588-884D-E470DF238DD3", + "refObjectType": "E", + "orderValue": 2 + }, + { + "refObjectId": "0CE38F31-EFD9-43A6-9BA5-3E13696C8444", + "refObjectType": "E", + "orderValue": 3 + }, + { + "refObjectId": "18C34285-97B3-48BD-BF1C-80FFD204878F", + "refObjectType": "E", + "orderValue": 4 + }, + { + "refObjectId": "CA27E812-84DF-415B-A517-D8EE72A5851F", + "refObjectType": "E", + "orderValue": 5 + }, + { + "refObjectId": "66210A03-E5D3-4AE3-9DF5-0A5FF1B55A2B", + "refObjectType": "E", + "orderValue": 6 + }, + { + "refObjectId": "298B913C-A7EC-42CF-B869-6F8F3EEA5CEB", + "refObjectType": "E", + "orderValue": 7 + }, + { + "refObjectId": "9B28F97D-A220-48BA-B256-99952BD84550", + "refObjectType": "E", + "orderValue": 8 + }, + { + "refObjectId": "1F8CC750-13F7-406D-9667-C328491C1A6E", + "refObjectType": "E", + "orderValue": 9 + }, + { + "refObjectId": "778D9EC8-362D-438D-8522-7DC1A9C4D55F", + "refObjectType": "E", + "orderValue": 10 + }, + { + "refObjectId": "A0E6ACDD-B2DA-478D-B98F-ECEF0B624979", + "refObjectType": "E", + "orderValue": 11 + }, + { + "refObjectId": "4C319989-B031-4A47-872B-632383A686EE", + "refObjectType": "E", + "orderValue": 12 + }, + { + "refObjectId": "C6C96F4E-DDF2-4F8E-ABE9-3DFA6BE487C5", + "refObjectType": "E", + "orderValue": 13 + }, + { + "refObjectId": "6AE16DDA-CDCA-4E66-80B5-775ACF4B124E", + "refObjectType": "E", + "orderValue": 14 + }, + { + "refObjectId": "457D3BF0-A5A6-4636-A83E-3903ACD2C4A2", + "refObjectType": "E", + "orderValue": 15 + }, + { + "refObjectId": "4DB0E9C1-05E9-47ED-A7AA-6BC7E87856D7", + "refObjectType": "E", + "orderValue": 16 + }, + { + "refObjectId": "96FF7EC9-5753-46BC-AE85-E2BDFEE6E043", + "refObjectType": "E", + "orderValue": 17 + }, + { + "refObjectId": "B724EF27-B827-4067-8F8F-43FD73F9DE24", + "refObjectType": "E", + "orderValue": 18 + }, + { + "refObjectId": "BEC9C790-0D4F-477F-9F31-8A9F41A4977D", + "refObjectType": "E", + "orderValue": 19 + }, + { + "refObjectId": "7F405312-ACDB-41FB-A8E0-6BD9CECA52D3", + "refObjectType": "P", + "orderValue": 20 + }, + { + "refObjectId": "9433E723-2A22-4004-8EEC-EA148772C5D4", + "refObjectType": "P", + "orderValue": 21 + } + ], + "diagramRefs": [], + "peerOrder": 1 + }, + { + "id": "C2ED7A76-B66C-4323-996C-0EB696D22C68", + "defKey": "goods", + "defName": "产品", + "classifyType": "MANUAL", + "manualClassify": "[\"P\"]", + "bindSchema": 0, + "children": null, + "entityRefs": [ + { + "refObjectId": "133C0B4F-2437-4D95-A692-C34553963E28", + "refObjectType": "P", + "orderValue": 1 + }, + { + "refObjectId": "286B768E-73F1-4390-9905-23684B92761F", + "refObjectType": "P", + "orderValue": 2 + } + ], + "diagramRefs": [], + "peerOrder": 2 + }, + { + "id": "8FF17ADC-6C66-4DBD-B7FC-0C0B6E35A910", + "defKey": "cost", + "defName": "费用", + "classifyType": "MANUAL", + "manualClassify": "[\"P\"]", + "bindSchema": 0, + "children": null, + "entityRefs": [ + { + "refObjectId": "1CD9AEA6-DAB8-40DF-8318-BCA343176C13", + "refObjectType": "P", + "orderValue": 1 + } + ], + "diagramRefs": [], + "peerOrder": 3 + } + ], + "flat": { + "entityRefs": [ + { + "refObjectId": "8783C5A5-46D1-4CDC-868F-B604C776D114", + "refObjectType": "P", + "orderValue": 1 + }, + { + "refObjectId": "298B913C-A7EC-42CF-B869-6F8F3EEA5CEB", + "refObjectType": "P", + "orderValue": 2 + }, + { + "refObjectId": "C2604D57-F42D-4588-884D-E470DF238DD3", + "refObjectType": "P", + "orderValue": 3 + }, + { + "refObjectId": "CA27E812-84DF-415B-A517-D8EE72A5851F", + "refObjectType": "P", + "orderValue": 4 + }, + { + "refObjectId": "66210A03-E5D3-4AE3-9DF5-0A5FF1B55A2B", + "refObjectType": "P", + "orderValue": 5 + }, + { + "refObjectId": "1F8CC750-13F7-406D-9667-C328491C1A6E", + "refObjectType": "P", + "orderValue": 6 + }, + { + "refObjectId": "778D9EC8-362D-438D-8522-7DC1A9C4D55F", + "refObjectType": "P", + "orderValue": 7 + }, + { + "refObjectId": "A0E6ACDD-B2DA-478D-B98F-ECEF0B624979", + "refObjectType": "P", + "orderValue": 8 + }, + { + "refObjectId": "4C319989-B031-4A47-872B-632383A686EE", + "refObjectType": "P", + "orderValue": 9 + }, + { + "refObjectId": "0CE38F31-EFD9-43A6-9BA5-3E13696C8444", + "refObjectType": "P", + "orderValue": 10 + }, + { + "refObjectId": "C6C96F4E-DDF2-4F8E-ABE9-3DFA6BE487C5", + "refObjectType": "P", + "orderValue": 11 + }, + { + "refObjectId": "457D3BF0-A5A6-4636-A83E-3903ACD2C4A2", + "refObjectType": "P", + "orderValue": 12 + }, + { + "refObjectId": "6AE16DDA-CDCA-4E66-80B5-775ACF4B124E", + "refObjectType": "P", + "orderValue": 13 + }, + { + "refObjectId": "9B28F97D-A220-48BA-B256-99952BD84550", + "refObjectType": "P", + "orderValue": 14 + }, + { + "refObjectId": "18C34285-97B3-48BD-BF1C-80FFD204878F", + "refObjectType": "P", + "orderValue": 15 + }, + { + "refObjectId": "4DB0E9C1-05E9-47ED-A7AA-6BC7E87856D7", + "refObjectType": "P", + "orderValue": 16 + }, + { + "refObjectId": "BEC9C790-0D4F-477F-9F31-8A9F41A4977D", + "refObjectType": "P", + "orderValue": 17 + }, + { + "refObjectId": "B724EF27-B827-4067-8F8F-43FD73F9DE24", + "refObjectType": "P", + "orderValue": 18 + }, + { + "refObjectId": "96FF7EC9-5753-46BC-AE85-E2BDFEE6E043", + "refObjectType": "P", + "orderValue": 19 + }, + { + "refObjectId": "9433E723-2A22-4004-8EEC-EA148772C5D4", + "refObjectType": "P", + "orderValue": 20 + }, + { + "refObjectId": "7F405312-ACDB-41FB-A8E0-6BD9CECA52D3", + "refObjectType": "P", + "orderValue": 21 + }, + { + "refObjectId": "133C0B4F-2437-4D95-A692-C34553963E28", + "refObjectType": "P", + "orderValue": 22 + }, + { + "refObjectId": "286B768E-73F1-4390-9905-23684B92761F", + "refObjectType": "P", + "orderValue": 23 + }, + { + "refObjectId": "1CD9AEA6-DAB8-40DF-8318-BCA343176C13", + "refObjectType": "P", + "orderValue": 24 + } + ], + "diagramRefs": [] + }, + "entities": [ + { + "id": "8783C5A5-46D1-4CDC-868F-B604C776D114", + "type": "P", + "schemaName": null, + "defKey": "sys_user", + "defName": "用户信息表", + "intro": "", + "fields": [ + { + "id": "B5950DAC-691C-4AA3-B290-2C5D49B9E70B", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "6F669BBD-A0F4-46E5-9640-0D0063A037E2", + "defKey": "nickname", + "defName": "昵称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "2D82A6A6-697D-4952-9672-AE7B2B4840A8", + "defKey": "avatar", + "defName": "头像", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "7AAAD217-C79A-4D34-BEC3-95F0562EDF7E", + "defKey": "email", + "defName": "邮箱", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 64, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "E0B29717-7ECB-4A86-94D5-EDEA731D8F95", + "defKey": "phone", + "defName": "手机号", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 20, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "81524E8A-11F7-4A22-8668-E2A8E2DFC8B9", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "SCOPE", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "6ECC8DE8-543F-49F2-8354-DD25828BC960", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "B54E24E2-D8EB-447A-A93E-65DB72F31138", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "74984F37-9AB3-4A37-A847-8A5E6E86E4AC", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "F5E3171C-3552-46D3-B9CF-2E8C108089CF", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [], + "props": "{\"codegen\":{\"Java_MybatisPlus\":{\"root\":\"\",\"nameSpace\":\"com.zsy\",\"baseName\":\"sys\",\"path\":{},\"var\":{}}}}", + "refers": [] + }, + { + "id": "298B913C-A7EC-42CF-B869-6F8F3EEA5CEB", + "type": "P", + "schemaName": null, + "defKey": "sys_role_resource", + "defName": "角色-资源关系表", + "intro": "", + "fields": [ + { + "id": "CD5CDECD-F531-4431-95C7-8CA0C50CE99D", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "62994428-8B0B-447B-800D-875787E38AD8", + "defKey": "role_id", + "defName": "角色 Id", + "intro": " sys_role.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "C83AC13D-CF7F-422B-8A24-F1DF5475A15A", + "defKey": "res_id", + "defName": "资源 Id", + "intro": " sys_resource.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "7C56FB41-1C18-4DCC-B6AE-2DCE98296D5D", + "defKey": "res_sn", + "defName": "资源编码", + "intro": " sys_resource.sn", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "AADF21B6-99EE-45CF-8919-8AF4695BC9DB", + "defKey": "table_name", + "defName": "表名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "table_name", + "stndDictKey": "table_name", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "sys_endpoint", + "itemName": "sys_endpoint", + "parentKey": "", + "intro": "", + "id": "56B841B5-A962-439B-A976-87923267960A" + }, + { + "itemKey": "sys_menu", + "itemName": "sys_menu", + "parentKey": "", + "intro": "", + "id": "F7A09664-A91C-42B1-8F86-BDC1AB4145A8" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "FC858145-BFD8-48A2-B437-81277B454839", + "defKey": "data_id", + "defName": "数据行 Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "2F1EBA99-DF4A-4887-98D3-176A0CC2DEB3", + "type": "UNIQUE", + "defKey": "uk__role_id__res_id", + "defName": null, + "intro": "", + "fields": [ + { + "id": "0C5E350A-6D80-406F-B390-EF34E8CA180E", + "fieldId": "62994428-8B0B-447B-800D-875787E38AD8", + "fieldDefKey": "role_id", + "sortType": "ASC" + }, + { + "id": "A19250EF-10A5-423C-A0E7-2A680FABF1E6", + "fieldId": "C83AC13D-CF7F-422B-8A24-F1DF5475A15A", + "fieldDefKey": "res_id", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "C2604D57-F42D-4588-884D-E470DF238DD3", + "type": "P", + "schemaName": null, + "defKey": "sys_user_account", + "defName": "用户账号信息表", + "intro": "", + "fields": [ + { + "id": "D4C7148C-5E5D-4B92-8E3D-051A32D0363B", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "E22A0379-10F5-49B6-809F-54482C36E903", + "defKey": "user_id", + "defName": "用户 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "49B6D867-C9AD-4416-BFEF-EAE09143D7E5", + "defKey": "username", + "defName": "用户名", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "A549F85E-1299-4CFB-A579-D50957BE9484", + "defKey": "phone", + "defName": "手机号", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 20, + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "C06D436D-29FC-4606-9347-793BE332880C", + "defKey": "secret", + "defName": "密码", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "67AA7D5E-8AED-4F26-BE0C-7AC13A0161EA", + "defKey": "wechat_openid", + "defName": "微信 openid", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "FE622241-51D0-4179-9DF7-ABB7645C46C6", + "defKey": "wechat_unionid", + "defName": "微信 unionid", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "41F855D6-1A0B-4768-BEAC-EF4F6B2223D3", + "defKey": "regdate", + "defName": "注册时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "62F30E2D-D755-4F5B-83E9-9FA3C7BA77BA", + "defKey": "client_code", + "defName": "允许登录的客户端", + "intro": "位权码", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "client_code", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "0", + "itemName": "WEB 后台", + "intro": "第 0 位", + "id": "68123977-C53D-4AAA-9B8E-44CCFFF96518" + }, + { + "itemKey": "1", + "itemName": "微信小程序", + "intro": "第 1 位", + "id": "0AB3C4CB-01C5-40E7-8C3C-C5EF71BC4BAC" + }, + { + "itemKey": "2", + "itemName": "手机 APP", + "intro": "第 2 位", + "id": "22B26C48-0C87-442F-ABDC-D9E9D2D2DB9D" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "68EE2E5E-F775-458D-8686-B8834995C062", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "E895BB09-59D2-49C0-BC3F-905934482D99", + "defKey": "disabled", + "defName": "是否禁用", + "intro": " 0-->启用、1-->禁用", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "160ECF62-5E00-41B6-8201-AC2F00FA5DDC", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "465A5DC8-90A0-45C6-BC50-2D15886E0098", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "0A2CB255-ED45-46C8-9EE8-F5BEB3106F68", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "AC8CBF6F-3DA2-449B-B652-0A16279BB24F", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "E6037BEF-AF5A-4134-B6DF-3CF9538A055C", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "8E72EA7E-E0F7-41AD-9737-834BEED084A2", + "type": "UNIQUE", + "defKey": "uk__user_id", + "defName": null, + "intro": "", + "fields": [ + { + "id": "FE6DE934-E19B-4C18-8B1B-2061847F3E3F", + "fieldId": "E22A0379-10F5-49B6-809F-54482C36E903", + "fieldDefKey": "user_id", + "sortType": "ASC" + } + ] + }, + { + "id": "31FEAE83-01E4-4664-A51C-D86E990DEE4E", + "type": "UNIQUE", + "defKey": "uk__username", + "defName": null, + "intro": "", + "fields": [ + { + "id": "107497C7-E327-4F15-87A7-AF0C7D1D368D", + "fieldId": "49B6D867-C9AD-4416-BFEF-EAE09143D7E5", + "fieldDefKey": "username", + "sortType": "ASC" + } + ] + }, + { + "id": "89BFA413-4BD9-4D82-AFAF-8FCE550B9B00", + "type": "UNIQUE", + "defKey": "uk__phone", + "defName": null, + "intro": "", + "fields": [ + { + "id": "382F4191-A71B-48B1-9296-17EED007CF4A", + "fieldId": "A549F85E-1299-4CFB-A579-D50957BE9484", + "fieldDefKey": "phone", + "sortType": "ASC" + } + ] + }, + { + "id": "7240ED10-0037-48A3-A7DE-AFF3CE5B9D77", + "type": "UNIQUE", + "defKey": "uk__wechat_openid__wechat_unionid", + "defName": null, + "intro": "", + "fields": [ + { + "id": "172BBB2E-99FB-4CC5-9A4E-DA4F62EBC410", + "fieldId": "67AA7D5E-8AED-4F26-BE0C-7AC13A0161EA", + "fieldDefKey": "wechat_openid", + "sortType": "ASC" + }, + { + "id": "9C8CF1AB-8CE4-4908-97EC-4D192DCB0B9C", + "fieldId": "FE622241-51D0-4179-9DF7-ABB7645C46C6", + "fieldDefKey": "wechat_unionid", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "CA27E812-84DF-415B-A517-D8EE72A5851F", + "type": "P", + "schemaName": null, + "defKey": "sys_user_role", + "defName": "用户-角色关系表", + "intro": "", + "fields": [ + { + "id": "16C43DD8-54D6-4CFF-BA94-9CF3BE3D8FA9", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "2C36197E-517F-4D85-A4CD-68ED933FA569", + "defKey": "user_id", + "defName": "用户 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "96090B5A-CEA8-49F2-82EF-0745B933B603", + "defKey": "role_id", + "defName": "角色 Id", + "intro": " sys_role.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "144C1E96-DE72-41E5-A1D6-BFC83E97D8C2", + "type": "UNIQUE", + "defKey": "uk__user_id__role_id", + "defName": null, + "intro": "", + "fields": [ + { + "id": "5286A7E4-C94D-4FA8-ACF7-8D9DA15640EB", + "fieldId": "2C36197E-517F-4D85-A4CD-68ED933FA569", + "fieldDefKey": "user_id", + "sortType": "ASC" + }, + { + "id": "7A8B49F9-BC64-445B-A1C7-F51697B6D371", + "fieldId": "96090B5A-CEA8-49F2-82EF-0745B933B603", + "fieldDefKey": "role_id", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "66210A03-E5D3-4AE3-9DF5-0A5FF1B55A2B", + "type": "P", + "schemaName": null, + "defKey": "sys_role", + "defName": "角色表", + "intro": "", + "fields": [ + { + "id": "743DC55A-46AB-48CA-B453-3449A61C966C", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "3E243155-4226-431F-A446-A670BF40E8C5", + "defKey": "role_code", + "defName": "角色代码", + "intro": " 以 ROLE_ 开头", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 64, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "F65EE38B-1826-494D-A421-AA642BA9FFF0", + "defKey": "role_name", + "defName": "角色名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 64, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "23EF1861-4EAE-45E6-B8A5-5664E9A8BF83", + "defKey": "memo", + "defName": "备注", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "937275A2-45A3-47B4-BB64-D001A710086A", + "type": "UNIQUE", + "defKey": "uk__role_code", + "defName": null, + "intro": "", + "fields": [ + { + "id": "FF553D81-46EB-4FF9-AF33-1DCEDB4E2D27", + "fieldId": "3E243155-4226-431F-A446-A670BF40E8C5", + "fieldDefKey": "role_code", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "1F8CC750-13F7-406D-9667-C328491C1A6E", + "type": "P", + "schemaName": null, + "defKey": "sys_endpoint", + "defName": "端点信息表", + "intro": "", + "fields": [ + { + "id": "AF4F6A2A-7207-49AC-B55F-F90B2B1D49AB", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "E6A31C7A-4E2B-4175-9BF0-C6FCC63A465F", + "defKey": "request_method", + "defName": "请求方式", + "intro": "字典代码:request_method", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 10, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "FAA53BDF-EE3F-4437-8323-0ACCB60F2804", + "defKey": "routing_path", + "defName": "路由前缀", + "intro": " 以 / 开头 或 为空", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "A1222DCF-9571-4AEC-8EA1-61E0EE9A4DEA", + "defKey": "endpoint_path", + "defName": "端点地址", + "intro": " 以 / 开头, Ant 匹配模式", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "E62C7F67-D35A-4EB4-BE09-8B980D1C62C1", + "defKey": "access_model", + "defName": "接口访问模式", + "intro": "字典代码:endpoint_access_model", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 64, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "'Logined'", + "stndDictId": "endpoint_access_model", + "stndDictKey": "endpoint_access_model", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Anonymous", + "itemName": "允许匿名访问", + "parentKey": "", + "intro": "", + "id": "10CDFFD0-BDE2-42AB-9F0E-51B0BAA3CD51" + }, + { + "itemKey": "Logined", + "itemName": "允许已登录用户访问", + "parentKey": "", + "intro": "", + "id": "A6776ACA-7AD1-47DB-83EB-EC5FBEAE7310" + }, + { + "itemKey": "Authenticated", + "itemName": "仅拥有权限的用户访问", + "parentKey": "", + "intro": "", + "id": "13FDE2FA-7989-4944-90EE-AD9C9BDE6819" + }, + { + "itemKey": "Forbidden", + "itemName": "禁止访问", + "parentKey": "", + "intro": "", + "id": "9BD8E9DE-0C3F-49ED-8D52-F12282E755EB" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "6FB60616-FC15-4D16-AEEB-0FF87DAC6F43", + "defKey": "memo", + "defName": "备注", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "2F3EF501-A1D2-4405-8D3E-EDF22CF33C81", + "type": "UNIQUE", + "defKey": "uk__method__routing__endpoint", + "defName": null, + "intro": "", + "fields": [ + { + "id": "8D8098D6-AEEE-441D-9B1C-72DD44B9C3DF", + "fieldId": "E6A31C7A-4E2B-4175-9BF0-C6FCC63A465F", + "fieldDefKey": "request_method", + "sortType": "ASC" + }, + { + "id": "5D46AF1B-BBF9-4C52-A0C7-72A76F5854A3", + "fieldId": "FAA53BDF-EE3F-4437-8323-0ACCB60F2804", + "fieldDefKey": "routing_path", + "sortType": "ASC" + }, + { + "id": "EEEC1769-5587-4C44-9FF4-E0C2A2F57EE5", + "fieldId": "A1222DCF-9571-4AEC-8EA1-61E0EE9A4DEA", + "fieldDefKey": "endpoint_path", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "778D9EC8-362D-438D-8522-7DC1A9C4D55F", + "type": "P", + "schemaName": null, + "defKey": "sys_menu", + "defName": "菜单信息表", + "intro": "", + "fields": [ + { + "id": "72D2810C-0AEA-4D83-94C6-C7F3AEB3BF4D", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "887EF609-A47C-45A4-942C-8AA5DA81AD76", + "defKey": "sn", + "defName": "编号", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "2F3E9658-790E-40CA-9242-7B5F2A4AECDC", + "origin": "IMPORT" + }, + { + "id": "FE7A4AD4-333D-41D6-AE5E-CDD41AA66724", + "defKey": "pid", + "defName": "上级 Id", + "intro": " 层级为 1 的节点值为 0", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "FD702A5A-6424-4FF3-8575-41F1E3695B0A", + "defKey": "title", + "defName": "菜单名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "97FCFEA1-7BE1-4A6D-97B1-9B8E285EFEC4", + "defKey": "icon", + "defName": "图标", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "577B1180-D8D3-4862-A912-55B9D8233E50", + "defKey": "tier", + "defName": "层级", + "intro": " >= 1", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "2560127A-4119-40ED-954A-A0FE0DFBA77E", + "defKey": "breadcrumb", + "defName": "面包路径", + "intro": "JSON 数组", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "'[]'", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "CEDC35DA-6C0F-45A7-B458-F8CD3005FDAE", + "defKey": "menu_category", + "defName": "类型", + "intro": "字典代码:menu_category", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "menu_category", + "stndDictKey": "menu_category", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Catalog", + "itemName": "目录", + "parentKey": "", + "intro": "", + "id": "2148662C-5857-4291-9962-2149D9DF7685" + }, + { + "itemKey": "Group", + "itemName": "组", + "parentKey": "", + "intro": "", + "id": "41588751-5966-4726-B7A6-8195C667BDF2" + }, + { + "itemKey": "Page", + "itemName": "页面", + "parentKey": "", + "intro": "", + "id": "E2012B5B-3753-4579-A76A-B10980EB1E04" + }, + { + "itemKey": "SubPage", + "itemName": "子页面", + "parentKey": "", + "intro": "", + "id": "EE132C95-CF18-4DC7-8611-EA4D25B40350" + }, + { + "itemKey": "Btn", + "itemName": "按钮", + "parentKey": "", + "intro": "", + "id": "99DA2011-BA59-470A-8E86-50C610E1D480" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "A82A797C-22A5-4E10-8431-403EF26B13FB", + "defKey": "freeze", + "defName": "标签是否冻结", + "intro": " 0-->否、1-->是", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "5E3F219F-6E8C-42D9-8D19-7C963A45F0DD", + "defKey": "sort", + "defName": "排序", + "intro": "", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "4142DCB1-C26D-4C18-85B7-A8006C985F10", + "defKey": "route_name", + "defName": "路由名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "1D7C01F2-9DC0-47A2-8EF1-3081F05B91ED", + "defKey": "route_path", + "defName": "路由地址", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "E0E3A4AB-B37C-498D-BFF4-BFFDE224BDD6", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "F21B74FB-339D-45BA-82EC-F4E6BF91B363", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "D798F126-A1F6-4128-B414-FDB0A94E862C", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "B6EAE759-DB92-441C-BD41-895E9EA6B459", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "B8B1BC9C-BB99-4394-AC7F-D2F121D8F7C5", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "B147D317-D2BE-4ACE-AE96-1A937D329090", + "type": "UNIQUE", + "defKey": "uk__sn", + "defName": "", + "intro": "", + "fields": [ + { + "id": "02057D9D-DC9A-4B14-8B5B-651C0116AF5B", + "fieldId": "887EF609-A47C-45A4-942C-8AA5DA81AD76", + "fieldDefKey": "sn", + "sortType": "ASC" + } + ] + }, + { + "id": "79B540FC-ABDF-482D-998D-34557115027F", + "type": "UNIQUE", + "defKey": "uk__route_name", + "defName": "", + "intro": "", + "fields": [ + { + "id": "67CF8098-3CA9-4B32-BC8F-A746B8BBD03D", + "fieldId": "4142DCB1-C26D-4C18-85B7-A8006C985F10", + "fieldDefKey": "route_name", + "sortType": "ASC" + } + ] + }, + { + "id": "DDF10EA4-3117-4D19-BC82-586A32E6D306", + "type": "UNIQUE", + "defKey": "uk__route_path", + "defName": "", + "intro": "", + "fields": [ + { + "id": "78E4EC67-F5A8-4A45-82B8-DFFD420A826D", + "fieldId": "1D7C01F2-9DC0-47A2-8EF1-3081F05B91ED", + "fieldDefKey": "route_path", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "A0E6ACDD-B2DA-478D-B98F-ECEF0B624979", + "type": "P", + "schemaName": null, + "defKey": "sys_file", + "defName": "文件记录表", + "intro": "", + "fields": [ + { + "id": "EB029413-1348-4C05-BB6E-E9E86A221280", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "C5224ECC-9AE2-464C-8510-DEBC41761214", + "defKey": "file_service", + "defName": "存储服务", + "intro": "字典代码:file_service", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 10, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "'OSS'", + "stndDictId": "file_service", + "stndDictKey": "file_service", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "OSS", + "itemName": "OSS", + "parentKey": "", + "intro": "", + "id": "E88CA49B-90AA-4E89-AEB6-F47308A159B8" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "C6AE2262-E56F-4E2E-BCC0-D0182171FB92", + "defKey": "bucket_name", + "defName": "桶名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "D179DDEB-6A89-49A5-9FBE-7DA0CD39977D", + "defKey": "object_name", + "defName": "对象名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "451007FB-213D-46C2-8807-95546B9387A7", + "defKey": "original_name", + "defName": "原文件名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "929BC182-5068-4FAF-9E9D-E1DE12C5A859", + "defKey": "size", + "defName": "文件大小", + "intro": " 单位: 字节", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "0F5BBA4A-A733-473F-A77D-1BAC4B8BF513", + "defKey": "mime", + "defName": "MIME 类型", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "8C2CFCE5-8B07-46A1-AC4C-F61243D088F5", + "defKey": "link", + "defName": "访问链接", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "E000685B-9D7E-446F-B0A6-6438325DC1DF", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "6C077F13-1288-418B-8549-89A2E52D58DF", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "1964E3BE-43BC-4270-B03D-918D25B1AF31", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "FFEB10C3-BE8D-4F73-A98F-93B2D9D35C0D", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "ABA168AF-3395-47C0-9EC1-C7E1DEBFA265", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "14261525-812F-4CB5-86D5-08C927E6BCFE", + "type": "UNIQUE", + "defKey": "uk_file", + "defName": "", + "intro": "", + "fields": [ + { + "id": "9819417E-89D8-4909-A2FA-3924EC56E313", + "fieldId": "D179DDEB-6A89-49A5-9FBE-7DA0CD39977D", + "fieldDefKey": "object_name", + "sortType": "ASC" + }, + { + "id": "152E7A40-1520-4797-ADD1-D2727555840A", + "fieldId": "C6AE2262-E56F-4E2E-BCC0-D0182171FB92", + "fieldDefKey": "bucket_name", + "sortType": "ASC" + }, + { + "id": "5C0CACF7-8D67-43DB-98BE-06DF5E3B4E5D", + "fieldId": "C5224ECC-9AE2-464C-8510-DEBC41761214", + "fieldDefKey": "file_service", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "4C319989-B031-4A47-872B-632383A686EE", + "type": "P", + "schemaName": null, + "defKey": "sys_file_ref", + "defName": "文件引用表", + "intro": "", + "fields": [ + { + "id": "7E286292-A20B-4406-8A28-577D33445472", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "98A15F46-04B5-4195-8024-22AAB149847A", + "defKey": "coord_table", + "defName": "表名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "846E2989-0BA0-4ED3-B838-A70075B64B7C", + "defKey": "coord_field", + "defName": "表字段", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "8D688BA4-9DC5-4942-B3BD-6B2CCC66A2F3", + "defKey": "coord_id", + "defName": "表记录 Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "AEA7A84C-CE20-4913-950F-422813F76E75", + "defKey": "file_id", + "defName": "文件 Id", + "intro": " sys_file.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "D263B965-28A7-45AA-B552-F699470D1489", + "defKey": "link", + "defName": "访问链接", + "intro": " sys_file.link", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "77FBBC89-61B3-4036-928A-3F453C0E64D9", + "type": "UNIQUE", + "defKey": "uk__coord_id__coord_field__coord_table__file_id", + "defName": null, + "intro": "", + "fields": [ + { + "id": "ABD1C80D-07C6-4240-92C0-8D3F0E4B90E2", + "fieldId": "8D688BA4-9DC5-4942-B3BD-6B2CCC66A2F3", + "fieldDefKey": "coord_id", + "sortType": "ASC" + }, + { + "id": "C4588572-D32C-46B2-8993-46B2D8A233AC", + "fieldId": "846E2989-0BA0-4ED3-B838-A70075B64B7C", + "fieldDefKey": "coord_field", + "sortType": "ASC" + }, + { + "id": "2F4D352C-C0F9-4690-AEDD-6B2416925BD5", + "fieldId": "98A15F46-04B5-4195-8024-22AAB149847A", + "fieldDefKey": "coord_table", + "sortType": "ASC" + }, + { + "id": "194EA6F4-D427-4104-98F5-B0829C523C15", + "fieldId": "AEA7A84C-CE20-4913-950F-422813F76E75", + "fieldDefKey": "file_id", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "0CE38F31-EFD9-43A6-9BA5-3E13696C8444", + "type": "P", + "schemaName": null, + "defKey": "sys_user_login_record", + "defName": "用户登录记录表", + "intro": "", + "fields": [ + { + "id": "85DB9029-6D98-46E4-A493-C717912D1107", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "76F70FC0-CD0F-4CFF-915C-6FC7B9ADEE7F", + "defKey": "user_id", + "defName": "用户 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "1C184F7B-8929-41FC-87F1-CACF0CD0BAA2", + "defKey": "user_account_id", + "defName": "用户账号 Id", + "intro": " sys_user_account.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "0F2EB4BC-8B26-4945-A6AD-4F2B1CED1ED0", + "defKey": "login_time", + "defName": "登录时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "3B1BA347-986A-4EB9-8FEB-7654A74D234A", + "defKey": "client_code", + "defName": "本次登录使用的客户端", + "intro": " 字典代码:client_code", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "client_code", + "stndDictKey": "client_code", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "0", + "itemName": "WEB 后台", + "intro": "第 0 位", + "id": "68123977-C53D-4AAA-9B8E-44CCFFF96518" + }, + { + "itemKey": "1", + "itemName": "微信小程序", + "intro": "第 1 位", + "id": "0AB3C4CB-01C5-40E7-8C3C-C5EF71BC4BAC" + }, + { + "itemKey": "2", + "itemName": "手机 APP", + "intro": "第 2 位", + "id": "22B26C48-0C87-442F-ABDC-D9E9D2D2DB9D" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "6C4A899F-41C2-4B7A-9BE8-675BF970771F", + "defKey": "auth_way", + "defName": "登录方式", + "intro": " 字典代码:auth_way", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 50, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "auth_way", + "stndDictKey": "auth_way", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Anonymous", + "itemName": "匿名登录", + "parentKey": "", + "intro": "", + "id": "C9836BF6-B245-4A46-A985-2DEE983F6A47" + }, + { + "itemKey": "Password", + "itemName": "账号密码登录", + "parentKey": "", + "intro": "", + "id": "52656A22-3810-46D3-A042-3341E2864EFF" + }, + { + "itemKey": "Phone", + "itemName": "手机验证码登录", + "parentKey": "", + "intro": "", + "id": "860EF9F7-1FD9-4A4A-8AC3-4410BADA6438" + }, + { + "itemKey": "Wechat", + "itemName": "微信登录", + "parentKey": "", + "intro": "", + "id": "37F234E7-715B-4E6B-BE7D-6E4C54F12241" + }, + { + "itemKey": "WechatMini", + "itemName": "微信小程序登录", + "parentKey": "", + "intro": "", + "id": "265C5F99-E67B-4BBB-B240-41939C2C05F1" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "63A4F667-91DF-4C5D-AEBD-2CF005004A67", + "defKey": "user_agent", + "defName": "用户代理", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "DA763D74-5274-4F5D-BFCF-B1C9044B905F", + "defKey": "ip", + "defName": "IP 地址", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "888843A8-DE6E-475C-9E30-F16883ED3FFD", + "defKey": "province_code", + "defName": "IP 归属地, 省 (编码)", + "intro": " sys_district.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "54129530-D607-4D00-A5E1-CD02CE1F7B24", + "defKey": "province_name", + "defName": "IP 归属地, 省 (名称)", + "intro": " sys_district.name", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "0951F0C7-5199-42A9-AC2C-5B3728192D2B", + "defKey": "city_code", + "defName": "IP 归属地, 市 (编码)", + "intro": " sys_district.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "F3C3782E-E3C0-4496-A354-55A22EA97B1E", + "defKey": "city_name", + "defName": "IP 归属地, 市 (名称)", + "intro": " sys_district.name", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "35D84AA7-AC29-44F1-BDDF-AEBF190E00FB", + "defKey": "area_code", + "defName": "IP 归属地, 区 (编码)", + "intro": " sys_district.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 0, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "12C1F926-B11B-469B-B6ED-6575F028341A", + "defKey": "area_name", + "defName": "IP 归属地, 区 (名称)", + "intro": " sys_district.name", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "24DB4170-1643-4671-9D00-1412B00A1E62", + "type": "NORMAL", + "defKey": "ix__user_id", + "defName": null, + "intro": "", + "fields": [ + { + "id": "3855120E-64C2-4BF9-AE8D-AB5564E3D433", + "fieldId": "76F70FC0-CD0F-4CFF-915C-6FC7B9ADEE7F", + "fieldDefKey": "user_id", + "sortType": "ASC" + } + ] + }, + { + "id": "2D1591F5-D713-447B-B2AD-EBAEC0528757", + "type": "NORMAL", + "defKey": "ix__user_account_id", + "defName": null, + "intro": "", + "fields": [ + { + "id": "6EAB00BB-40D7-45BB-A271-2F29C656E60D", + "fieldId": "1C184F7B-8929-41FC-87F1-CACF0CD0BAA2", + "fieldDefKey": "user_account_id", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "C6C96F4E-DDF2-4F8E-ABE9-3DFA6BE487C5", + "type": "P", + "schemaName": null, + "defKey": "sys_dict", + "defName": "字典表", + "intro": "", + "fields": [ + { + "id": "7951EF6F-7F20-49DF-9724-163654B36816", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "911DDD38-FDB2-419D-B348-92B1CFF24D75", + "defKey": "dict_key", + "defName": "字典标识", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "178626EA-98BD-484A-87AF-F125A7AC86EB", + "defKey": "dict_name", + "defName": "字典名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "48409F70-35FB-4976-A21C-144709C7CB87", + "defKey": "memo", + "defName": "备注", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "1445C463-8DF1-46FD-91E6-83FE4EE2A228", + "origin": "IMPORT" + }, + { + "id": "95B6AAA5-40B4-4FDD-828D-BDA7682E859B", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "86CC63D1-0412-4D70-AE54-B15803463F85", + "type": "UNIQUE", + "defKey": "uk__dict_key", + "defName": null, + "intro": "", + "fields": [ + { + "id": "72A9A4DF-19EC-466F-8B9E-B82047DDC62E", + "fieldId": "911DDD38-FDB2-419D-B348-92B1CFF24D75", + "fieldDefKey": "dict_key", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "457D3BF0-A5A6-4636-A83E-3903ACD2C4A2", + "type": "P", + "schemaName": null, + "defKey": "sys_district", + "defName": "省市区表", + "intro": "", + "fields": [ + { + "id": "78EA8506-57D1-4294-8734-90EE8A2E4A2A", + "defKey": "id", + "defName": "Id", + "intro": " 地区代码", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 16, + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "2B403C98-B847-4747-92B1-05C362EC2842", + "defKey": "pid", + "defName": "上级地区代码", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 16, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "8B7D662B-70EC-42FF-BAE9-3D8D0E294F78", + "defKey": "province", + "defName": "省", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 16, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "DCC77779-B28F-41DE-B824-346DC5A88F94", + "defKey": "city", + "defName": "市", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 16, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "89217C5F-5E51-4A19-BDD2-0697846CF4B0", + "defKey": "area", + "defName": "区县", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 16, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "73D40062-F2FE-4901-87B1-F608384927E5", + "defKey": "town", + "defName": "乡镇街道", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 16, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "AA850AAE-93F3-495B-832B-C8A6CAE59A42", + "defKey": "district_name", + "defName": "地区名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "987E5EE9-6B6F-482E-B0FB-B215D80CD3D8", + "defKey": "tier", + "defName": "层级", + "intro": " >= 1", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "C529C4A6-731A-4049-B757-0FBBEFEF6D5B", + "defKey": "sort", + "defName": "排序", + "intro": "", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [], + "refers": [] + }, + { + "id": "6AE16DDA-CDCA-4E66-80B5-775ACF4B124E", + "type": "P", + "schemaName": null, + "defKey": "sys_dict_item", + "defName": "字典条目表", + "intro": "", + "fields": [ + { + "id": "6D991AE5-E540-4058-BEDA-54906993AD68", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "827FF9C1-7898-4FCD-A25E-71059AFEF877", + "defKey": "dict_id", + "defName": "字典 Id", + "intro": " sys_dict.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "D12082FA-A959-4777-A7DE-0F11526BF794", + "defKey": "dict_key", + "defName": "字典标识", + "intro": " sys_dict.dict_key", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "66F76230-DD96-4ED6-9552-3D967C3593BE", + "defKey": "val", + "defName": "值", + "intro": " 分类值/字典项值", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 100, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "85D0039C-040B-4D15-8611-A12D4DEB7F48", + "defKey": "txt", + "defName": "显示文本", + "intro": " 分类显示文本/字典项显示文本", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 100, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "AF899BFF-37AD-427C-81B9-73F0CC656409", + "defKey": "sort", + "defName": "排序", + "intro": "", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "EDB29EB5-7A44-4B5B-9649-28E4E38FEA90", + "defKey": "memo", + "defName": "备注", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "1445C463-8DF1-46FD-91E6-83FE4EE2A228", + "origin": "IMPORT" + }, + { + "id": "FD577885-590A-4751-8DA1-ED1B5FFFACD2", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "410C8754-40E8-40C6-9032-F518398EAE03", + "type": "UNIQUE", + "defKey": "ix__k__v", + "defName": null, + "intro": "", + "fields": [ + { + "id": "2EAECBEF-4430-4EC1-999F-6741A8FA5E05", + "fieldId": "D12082FA-A959-4777-A7DE-0F11526BF794", + "fieldDefKey": "dict_key", + "sortType": "ASC" + }, + { + "id": "414EF957-898C-4CFE-9708-BC107E7D5103", + "fieldId": "66F76230-DD96-4ED6-9552-3D967C3593BE", + "fieldDefKey": "val", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "9B28F97D-A220-48BA-B256-99952BD84550", + "type": "P", + "schemaName": null, + "defKey": "sys_resource", + "defName": "系统资源表", + "intro": "", + "fields": [ + { + "id": "AC57CE2C-620D-4E43-A298-D561226E588D", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "A203D48B-BBFF-4DF4-BA9D-3F33A6ED4667", + "defKey": "sn", + "defName": "编号", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "2F3E9658-790E-40CA-9242-7B5F2A4AECDC", + "origin": "IMPORT" + }, + { + "id": "88AC1A46-1331-4BD6-90EF-D7AE6D790ECC", + "defKey": "table_name", + "defName": "表名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "table_name", + "stndDictKey": "table_name", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "sys_menu", + "itemName": "sys_menu", + "parentKey": "", + "intro": "", + "id": "E034F5BF-B90A-48BE-8559-6997C32A86ED" + }, + { + "itemKey": "sys_endpoint", + "itemName": "sys_endpoint", + "parentKey": "", + "intro": "", + "id": "B82A6EEC-E524-4D53-A673-B64CEC2667EA" + } + ], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "DDACD242-588D-4683-9A9B-206A34665ED2", + "origin": "IMPORT" + }, + { + "id": "1CB48909-11F7-4B45-9B47-DC48B1152D8F", + "defKey": "data_id", + "defName": "数据行 Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "226B6D26-24EF-4438-A07C-461EF8953E76", + "defKey": "memo", + "defName": "备注", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "1445C463-8DF1-46FD-91E6-83FE4EE2A228", + "origin": "IMPORT" + } + ], + "indexes": [ + { + "id": "88C775B3-6F86-4B41-A083-A846C873D9E6", + "type": "UNIQUE", + "defKey": "uk__sn", + "defName": "", + "intro": "", + "fields": [ + { + "id": "75D154D2-D9CE-437F-BF08-2B11D3899011", + "fieldId": "A203D48B-BBFF-4DF4-BA9D-3F33A6ED4667", + "fieldDefKey": "sn", + "sortType": "ASC" + } + ] + }, + { + "id": "3D5D62FB-C418-47B3-A255-5D38A841493B", + "type": "UNIQUE", + "defKey": "uk__table_name__data_id", + "defName": "", + "intro": "", + "fields": [ + { + "id": "95B6639D-C9B5-47CF-894B-673B9B224CB5", + "fieldId": "88AC1A46-1331-4BD6-90EF-D7AE6D790ECC", + "fieldDefKey": "table_name", + "sortType": "ASC" + }, + { + "id": "F8606F62-F704-4D88-B77B-53E70F06AE98", + "fieldId": "1CB48909-11F7-4B45-9B47-DC48B1152D8F", + "fieldDefKey": "data_id", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "18C34285-97B3-48BD-BF1C-80FFD204878F", + "type": "P", + "schemaName": null, + "defKey": "sys_user_token", + "defName": "登录令牌表", + "intro": "", + "fields": [ + { + "id": "FD42A5D2-2454-4D66-AD76-2F3080AB30AD", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "4E4B45A6-6F9E-4C51-8DBB-EB6C8F680B92", + "defKey": "user_id", + "defName": "用户 Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "A4DD7383-0EBB-4848-A8DF-CD2E0604829A", + "defKey": "tid", + "defName": "Token Id", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "06DC0E08-1C6B-4C52-B74C-3AF24B191DF4", + "defKey": "tkey", + "defName": "Token 键", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "C47238C5-38BF-461D-9638-8A05A2B4D483", + "defKey": "tval", + "defName": "Token 值", + "intro": "", + "baseDataType": "TEXT", + "bizDomainType": "", + "dbDataType": "TEXT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "76079C04-EAA5-4759-9EAC-9553DADAFB44", + "defKey": "user_detail", + "defName": "用户信息", + "intro": "", + "baseDataType": "TEXT", + "bizDomainType": "", + "dbDataType": "TEXT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [], + "refers": [] + }, + { + "id": "4DB0E9C1-05E9-47ED-A7AA-6BC7E87856D7", + "type": "P", + "schemaName": null, + "defKey": "sys_tpl", + "defName": "代码模板", + "intro": "", + "fields": [ + { + "id": "907BD07E-BE66-4CDC-A3D9-DFF1BE66B696", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "4E8AD734-8083-4012-BA38-80AA011CB965", + "defKey": "tpl_name", + "defName": "模板名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "1752A8C7-C185-4925-91DB-2997B7D162D5", + "defKey": "tpl_category", + "defName": "模板类型", + "intro": " 字典编码:tpl_category", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 64, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "C95E4A89-BD9F-4CD5-9785-F05A26E5E5BD", + "defKey": "tpl", + "defName": "模板内容", + "intro": "", + "baseDataType": "LONGTEXT", + "bizDomainType": "", + "dbDataType": "LONGTEXT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + }, + { + "id": "0CF7E522-DC2B-41E0-BCB6-72E016DD6DF3", + "defKey": "model_data", + "defName": "模型数据", + "intro": "", + "baseDataType": "LONGTEXT", + "bizDomainType": "", + "dbDataType": "LONGTEXT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": "", + "stndFieldKey": "", + "dictFrom": "", + "dictItems": [], + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "IMPORT" + } + ], + "indexes": [], + "refers": [] + }, + { + "id": "BEC9C790-0D4F-477F-9F31-8A9F41A4977D", + "type": "P", + "defKey": "sys_task_execute_log", + "defName": "任务执行日志表", + "intro": null, + "schemaName": null, + "props": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "fields": [ + { + "id": "EE5F52D0-D6DC-4376-B40A-AC9E4D8EE5AF", + "defKey": "id", + "defName": "Id", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": 1, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "170AD29D-B588-40FE-8650-7D1CA885D4C2", + "defKey": "schedule_id", + "defName": "调度 Id", + "intro": "sys_task_schedule_recode.id", + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "00B3A9E6-773A-4390-8233-1FCD1AA05DDD", + "defKey": "log_level", + "defName": "日志等级", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "F15E16CD-D780-4DA2-BBCB-48A9E1C3267C", + "defKey": "log_time", + "defName": "日志时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "F4ACE66E-2F98-43E7-A3F9-7B94AA253DE7", + "defKey": "place", + "defName": "位置", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "''", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "3B742E11-8E70-4DBB-99F7-9D4B28BEC625", + "defKey": "line", + "defName": "行号", + "intro": null, + "orderValue": null, + "baseDataType": "MEDIUMINT", + "bizDomainType": "", + "dbDataType": "MEDIUMINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": null, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "9F8A5798-2F6C-4E92-AC98-2CC48D3EF575", + "defKey": "msg", + "defName": "日志信息", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "B6F7D474-103C-4769-99FE-0B303A85F52A", + "defKey": "err", + "defName": "错误信息", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "B038DBF8-2FB7-4A95-88EF-24B1572E90F8", + "defKey": "create_time", + "defName": "创建时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + } + ], + "correlations": null, + "indexes": [ + { + "id": "546303A9-893B-474C-B731-18D1EE0105B4", + "type": "NORMAL", + "defKey": "ix__schedule_id", + "defName": "", + "intro": "", + "fields": [ + { + "id": "A6E0C346-5454-4F51-95EA-167C94BB9D74", + "fieldId": "170AD29D-B588-40FE-8650-7D1CA885D4C2", + "fieldDefKey": "schedule_id", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "B724EF27-B827-4067-8F8F-43FD73F9DE24", + "type": "P", + "defKey": "sys_task_schedule_recode", + "defName": "任务调度记录表", + "intro": null, + "schemaName": null, + "props": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "fields": [ + { + "id": "84FD3DCD-1A56-4D22-8150-FEB06F33F38F", + "defKey": "id", + "defName": "Id", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": 1, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "A4D2BD9D-6C11-40D5-948C-7AEB3DC2831B", + "defKey": "task_id", + "defName": "任务 Id", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "DD8E2295-0ECC-4BE6-9DC5-4662062C6549", + "defKey": "task_name", + "defName": "任务名称", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "DC731405-B925-425F-B44F-767E905DABCB", + "defKey": "fn", + "defName": "任务执行函数", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "1050C775-2266-4B81-BF76-586054C4ACF6", + "defKey": "schedule_type", + "defName": "调度方式", + "intro": "字典代码:schedule_type", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": "schedule_type", + "stndDictKey": "schedule_type", + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null, + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Manually", + "itemName": "手动", + "parentKey": "", + "intro": "", + "id": "D0E4EA6B-3B64-4FFA-8363-57937816FCC3" + }, + { + "itemKey": "Fixed", + "itemName": "固定周期", + "parentKey": "", + "intro": "", + "id": "1A90351E-E8C8-44FA-B1FD-BDAF0AF6A71A" + }, + { + "itemKey": "Cron", + "itemName": "表达式", + "parentKey": "", + "intro": "", + "id": "CC9F5892-3EF1-4EC8-897C-B551E39A7CD7" + } + ] + }, + { + "id": "E2CF396D-E929-4DB5-94B1-6A5DED42CF9A", + "defKey": "schedule_conf", + "defName": "调度配置", + "intro": "手动时为空,固定周期时单位为秒", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 24, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "66921721-42D3-477F-A3B4-497F5820CF77", + "defKey": "schedule_time", + "defName": "调度时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "2528EDDF-5535-435F-A84C-F8275DD0F64C", + "defKey": "start_time", + "defName": "任务开始时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": null, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "543D729D-A2F6-4261-80B0-7E9E0FA99523", + "defKey": "end_time", + "defName": "任务结束时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": null, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "C1D000B8-A155-4F0D-8DA4-AFBE3CCDA7D1", + "defKey": "task_status", + "defName": "任务状态", + "intro": "字典代码:task_status", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": "task_status", + "stndDictKey": "task_status", + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null, + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Waiting", + "itemName": "等待调度", + "parentKey": "", + "intro": "", + "id": "58B5D29A-2BB7-4AAC-9A24-C1A5DB5F81A6" + }, + { + "itemKey": "Pending", + "itemName": "排队中", + "parentKey": "", + "intro": "", + "id": "0F78CF98-2B73-4043-B294-476A38A946E1" + }, + { + "itemKey": "Running", + "itemName": "运行中", + "parentKey": "", + "intro": "", + "id": "29761C8F-0F87-43E8-9411-3A31B5B1A186" + }, + { + "itemKey": "Completed", + "itemName": "已完成", + "parentKey": "", + "intro": "", + "id": "C103CCBA-1CFE-4477-911A-41B07A81C9C2" + }, + { + "itemKey": "Error", + "itemName": "错误", + "parentKey": "", + "intro": "", + "id": "D9E6684E-F9E2-4531-83DF-5998F6B6B76F" + } + ] + }, + { + "id": "91CBDB39-4CA0-4B04-9918-2A6130F3154F", + "defKey": "builtin", + "defName": "是否为内内置任务", + "intro": "0-->否、1-->是", + "orderValue": null, + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "E7D429F7-4C45-410C-AA38-1E0752A46A2C", + "defKey": "manually", + "defName": "本次调度是否为手动触发", + "intro": "0-->否、1-->是", + "orderValue": null, + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "BB0F6ED0-1AFF-4DD0-8BD7-79C11361C406", + "defKey": "memo", + "defName": "备注", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "6F7CC7C6-DAAC-41C8-B021-DC1146A28842", + "defKey": "create_time", + "defName": "创建时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + } + ], + "correlations": null, + "indexes": [ + { + "id": "824EB397-7D7A-4250-BAAC-2B2497D77C8D", + "type": "NORMAL", + "defKey": "ix__task_id", + "defName": "", + "intro": "", + "fields": [ + { + "id": "E88CCABC-9C7B-44DA-BFE8-F5DB632E19F8", + "fieldId": "A4D2BD9D-6C11-40D5-948C-7AEB3DC2831B", + "fieldDefKey": "task_id", + "sortType": "ASC" + } + ] + } + ], + "refers": [] + }, + { + "id": "96FF7EC9-5753-46BC-AE85-E2BDFEE6E043", + "type": "P", + "defKey": "sys_task", + "defName": "定时任务表", + "intro": null, + "schemaName": null, + "props": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "fields": [ + { + "id": "15D08AEA-D5E6-49BC-B5EF-CC9D56C7F742", + "defKey": "id", + "defName": "Id", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": 1, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "5FA761F0-91D9-4266-ACAE-A1753B64FDF7", + "defKey": "task_name", + "defName": "任务名称", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "BF5B25D5-4AAD-4ECD-A65D-0D6397E7DC2A", + "defKey": "fn", + "defName": "任务执行函数", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "5BF762A9-4851-4622-8C25-5172FCE9DF5B", + "defKey": "log_level", + "defName": "日志等级", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "INFO", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "583F0CF9-5981-45EB-9BD5-E124EA2C5091", + "defKey": "schedule_type", + "defName": "调度方式", + "intro": "字典代码:schedule_type", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": "schedule_type", + "stndDictKey": "schedule_type", + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null, + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Manually", + "itemName": "手动", + "parentKey": "", + "intro": "", + "id": "D0E4EA6B-3B64-4FFA-8363-57937816FCC3" + }, + { + "itemKey": "Fixed", + "itemName": "固定周期", + "parentKey": "", + "intro": "", + "id": "1A90351E-E8C8-44FA-B1FD-BDAF0AF6A71A" + }, + { + "itemKey": "Cron", + "itemName": "表达式", + "parentKey": "", + "intro": "", + "id": "CC9F5892-3EF1-4EC8-897C-B551E39A7CD7" + } + ] + }, + { + "id": "A369B9F7-13AE-438C-9373-B2385CC176CD", + "defKey": "schedule_conf", + "defName": "调度配置", + "intro": "手动时为空,固定周期时单位为秒", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 24, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "371B9790-CDC6-480E-AA0C-4314409ADDBB", + "defKey": "critical_timing", + "defName": "临界时间", + "intro": "时间戳,单位:秒", + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "0A563160-8BF8-4AED-9B5B-A03A2F02ADFE", + "defKey": "disabled", + "defName": "是否禁用", + "intro": "0-->否、1-->是", + "orderValue": null, + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "0", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "9CB2EDFC-3582-494F-81F2-A90C175327A3", + "defKey": "memo", + "defName": "备注", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "ECEBD4EB-E3B7-4F2A-B6F7-E14F4D5D39B7", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": "sys_user.id", + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "982B3C15-A487-44B5-8FC1-922DF1A9BF48", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": "sys_user.id", + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": "", + "stndDictKey": "", + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null, + "dictFrom": "" + }, + { + "id": "CF21B015-4E58-403E-9E88-5CFC1B6E2940", + "defKey": "create_time", + "defName": "创建时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "DA97803E-70DD-4CD9-B237-880651056E28", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "543065B6-52AB-4267-B385-BE1F9E61F8B8", + "defKey": "deleted", + "defName": "是否删除", + "intro": "0-->未删除、1-->已删除", + "orderValue": null, + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "0", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + } + ], + "correlations": null, + "indexes": [], + "refers": [] + }, + { + "id": "9433E723-2A22-4004-8EEC-EA148772C5D4", + "type": "P", + "defKey": "sys_sn_inc", + "defName": "递增编码表", + "intro": null, + "schemaName": null, + "props": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "fields": [ + { + "id": "315725B4-8275-4243-AD40-02AA62EB9473", + "defKey": "id", + "defName": "Id", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": 1, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "244E6EEA-BB19-4BC5-8329-EEF9C4DBBF52", + "defKey": "code", + "defName": "标识", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "30DA604B-1DBA-4AB9-93C8-387E56E8010F", + "defKey": "val", + "defName": "当前值", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "6307DA42-F36B-4004-81AF-3CDD5C640FB0", + "defKey": "step", + "defName": "步长", + "intro": null, + "orderValue": null, + "baseDataType": "MEDIUMINT", + "bizDomainType": "", + "dbDataType": "MEDIUMINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "9A1B868A-AE52-4BF1-B02C-561FC638D251", + "defKey": "initial_val", + "defName": "初始值", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "35A78735-6FB1-41B0-937F-139B458A0662", + "defKey": "pad_mode", + "defName": "填充模式", + "intro": "字典编码:pad_mode", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": "pad_mode", + "stndDictKey": "pad_mode", + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null, + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Wu", + "itemName": "无", + "parentKey": "", + "intro": "", + "id": "F7EAC716-2993-4579-9ED4-6F9BCBF1390B" + }, + { + "itemKey": "Zuo", + "itemName": "左", + "parentKey": "", + "intro": "", + "id": "0EC109C4-07F5-43C2-B8C6-7D78056F6ADD" + }, + { + "itemKey": "You", + "itemName": "右", + "parentKey": "", + "intro": "", + "id": "B5F82E07-00F3-4BDA-948C-3CF1E0A40823" + } + ] + }, + { + "id": "5B32D69C-4DEF-4F6F-8CA0-DE0FD4967141", + "defKey": "pad_val", + "defName": "填充值", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 64, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "63B66A4F-B6B5-4C14-8302-EFE50694C92C", + "defKey": "pad_len", + "defName": "填充长度", + "intro": null, + "orderValue": null, + "baseDataType": "MEDIUMINT", + "bizDomainType": "", + "dbDataType": "MEDIUMINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "3B3C97EC-74B5-4A98-B3E7-A1D1D95D1AB7", + "defKey": "rollback_mode", + "defName": "回卷策略", + "intro": "字典编码:rollback_mode", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 32, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "'Wu'", + "stndDictId": "rollback_mode", + "stndDictKey": "rollback_mode", + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null, + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Wu", + "itemName": "不回卷", + "parentKey": "", + "intro": "", + "id": "D1C2C49A-8161-4F9E-B7AB-8AAF9B6B6988" + }, + { + "itemKey": "Ri", + "itemName": "每日", + "parentKey": "", + "intro": "", + "id": "723D741A-E2F9-4AAD-9448-D3288019C2CA" + }, + { + "itemKey": "Zhou", + "itemName": "每周", + "parentKey": "", + "intro": "", + "id": "118349A4-B992-4EA8-9889-E17FBABE1D0C" + }, + { + "itemKey": "Yue", + "itemName": "每月", + "parentKey": "", + "intro": "", + "id": "D9E15A2A-FB45-4A30-A321-2C7DA0AC224C" + }, + { + "itemKey": "Nian", + "itemName": "每年", + "parentKey": "", + "intro": "", + "id": "C1F4918D-23C9-4DE0-BD2E-51195DDACB58" + }, + { + "itemKey": "Pi", + "itemName": "每批", + "parentKey": "", + "intro": "", + "id": "F62A63B3-1C17-4C47-B63A-8E59CD78FF60" + } + ] + }, + { + "id": "956003EE-0A72-44F4-BD02-F2419E103D84", + "defKey": "allow_overflow", + "defName": "是否允许溢出(溢出时回卷)", + "intro": "0-->否、1-->是", + "orderValue": null, + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "1", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "0F3A15A5-AEEC-4CAB-B226-F34A745D758F", + "defKey": "last_time", + "defName": "上次生成时间", + "intro": null, + "orderValue": null, + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 0, + "autoIncrement": null, + "defaultValue": "", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "8764C444-F9A5-4BFB-8ED9-7FB9BFC61D29", + "defKey": "last_pici", + "defName": "上一批编号", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "141C5515-00C4-4963-80A3-3A727E17FBB0", + "defKey": "max_val", + "defName": "最大值", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "9223372036854775807", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + } + ], + "correlations": null, + "indexes": [ + { + "id": "0EAD53BA-6E44-4EFA-BA4E-0A4C9F5CC8C6", + "type": "UNIQUE", + "defKey": "uk__code", + "defName": "", + "intro": "", + "fields": [ + { + "id": "E8B90AB3-89EE-47DA-BE83-C345F2F06387", + "fieldId": "244E6EEA-BB19-4BC5-8329-EEF9C4DBBF52", + "fieldDefKey": "code", + "sortType": "ASC" + } + ] + } + ] + }, + { + "id": "7F405312-ACDB-41FB-A8E0-6BD9CECA52D3", + "type": "P", + "defKey": "sys_sn_config", + "defName": "编码配置表", + "intro": null, + "schemaName": null, + "props": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "fields": [ + { + "id": "D3E11252-2864-4E18-A198-306936B8D73D", + "defKey": "id", + "defName": "Id", + "intro": null, + "orderValue": null, + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": null, + "numScale": null, + "primaryKey": 1, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "9EE8A2F3-73E0-49CA-8598-02EB7794F6E4", + "defKey": "sncode", + "defName": "配置编码", + "intro": "", + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "4F728095-D14B-477F-B52A-BBF48AD7095A", + "defKey": "snname", + "defName": "配置名称", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "89344BDF-5C27-4743-AE76-C3E2CDFE0A45", + "defKey": "example", + "defName": "示例", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": "", + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "9733586F-58CD-4E07-AEE2-ABE3245EDB4A", + "defKey": "config", + "defName": "配置", + "intro": null, + "orderValue": null, + "baseDataType": "TEXT", + "bizDomainType": "", + "dbDataType": "TEXT", + "dataLen": "", + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + }, + { + "id": "2F0E9DEB-DEDC-4E79-86F2-6A900DE7CC60", + "defKey": "memo", + "defName": "备注", + "intro": null, + "orderValue": null, + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 128, + "numScale": null, + "primaryKey": null, + "notNull": 1, + "autoIncrement": null, + "defaultValue": null, + "stndDictId": null, + "stndDictKey": null, + "stndFieldId": null, + "stndFieldKey": null, + "mark": null, + "attr1": null, + "attr2": null, + "attr3": null, + "attr4": null, + "attr5": null, + "attr6": null, + "attr7": null, + "attr8": null, + "attr9": null, + "attr10": null, + "attr11": null, + "attr12": null, + "attr13": null, + "attr14": null, + "attr15": null, + "attr16": null, + "attr17": null, + "attr18": null, + "attr19": null, + "attr20": null, + "origin": null, + "stndComplianceType": null, + "stndComplianceLevel": null, + "updatedUserId": null, + "createdUserId": null + } + ], + "correlations": null, + "indexes": [ + { + "id": "2C9B658C-5B48-4874-9A75-9EF50CF72E92", + "type": "UNIQUE", + "defKey": "uk__sncode", + "defName": "", + "intro": "", + "fields": [ + { + "id": "C46A2261-C149-402C-8854-43A948061510", + "fieldId": "9EE8A2F3-73E0-49CA-8598-02EB7794F6E4", + "fieldDefKey": "sncode", + "sortType": "ASC" + } + ] + } + ] + }, + { + "id": "133C0B4F-2437-4D95-A692-C34553963E28", + "schemaName": null, + "defKey": "goods_category", + "defName": "产品分类", + "intro": "", + "type": "P", + "fields": [ + { + "id": "53E8A8F8-30E7-4C5A-82AF-18DB3B79512E", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "1546E246-FD53-435C-8956-4F453BA9C096", + "defKey": "category_name", + "defName": "分类名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "5DE64791-E980-48D8-AD7C-BF509B3638FD", + "defKey": "picture", + "defName": "图片", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "0EF2D2B7-8458-450D-8515-DFFAE8AAF42F", + "defKey": "sort", + "defName": "排序", + "intro": "", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "380D1990-AEEB-49A0-9144-99D5A764D8EB", + "defKey": "storage_type", + "defName": "库存类型", + "intro": "字典代码:storage_type", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "storage_type", + "stndFieldId": "", + "stndDictKey": "storage_type", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Chu", + "itemName": "出库", + "parentKey": "", + "intro": "出库", + "id": "BF53A72D-73FE-4FE4-A3FA-8F23C5258B35" + }, + { + "itemKey": "Ru", + "itemName": "入库", + "parentKey": "", + "intro": "入库", + "id": "F0EBCDCC-0B35-4164-80BC-5567F3661E86" + } + ], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "EBF87EB9-8CD7-454E-8524-8AD01F924E4C", + "defKey": "biz_type", + "defName": "业务类型", + "intro": "字典代码:biz_type", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "biz_type", + "stndFieldId": "", + "stndDictKey": "biz_type", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "ZaiShengPin", + "itemName": "再生品", + "parentKey": "", + "intro": "", + "id": "69377C1B-B55E-464E-AD4B-16C5A920931C" + }, + { + "itemKey": "HuiShouPin", + "itemName": "回收品", + "parentKey": "", + "intro": "", + "id": "00CE1E03-41C5-473C-AF3A-F0F06F4311A0" + } + ], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "33025475-7640-46C6-93AE-79AEAFD628FF", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "FB6B8625-AE7B-4463-BB71-40F80F97E934", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "D3F94CC9-010D-4E75-8DE5-77308B195C1C", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "A77B395B-C290-4930-9D5A-A9B8F7DF90C6", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "839B1ECA-A18B-45DE-9F63-FECC409A2E44", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + } + ], + "indexes": [], + "props": "{\"codegen\":{\"Java_MybatisPlus\":{\"root\":\"\",\"nameSpace\":\"\",\"baseName\":\"\",\"path\":{},\"var\":{}}}}" + }, + { + "id": "286B768E-73F1-4390-9905-23684B92761F", + "schemaName": null, + "defKey": "goods", + "defName": "产品", + "intro": "", + "type": "P", + "fields": [ + { + "id": "E2205762-9784-41D0-8F6A-CE1FAD0117AD", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "98E972DB-70DD-4096-A1ED-E71A906F991B", + "defKey": "sn", + "defName": "商品编码", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "DB75E8FF-191C-4B6E-A8DA-124AEC238F12", + "defKey": "goods_name", + "defName": "产品名称", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "20E8584E-F1DE-4620-8B6F-DE6EA3DB4AF0", + "defKey": "goods_category_id", + "defName": "产品类型Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": "{}", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "DC0A7BFF-DBC9-4AA4-8202-00F1C31947AD", + "defKey": "picture", + "defName": "图片", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 255, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "FCEC7D67-6297-42A7-9D17-5C6132F175BD", + "defKey": "cost_config_id", + "defName": "计费配置", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "69C36FA2-0F56-421C-9FF0-051FC563FE64", + "defName": "排序", + "intro": "", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "2FCC61E1-1433-4491-AC59-E09D63B762B3", + "defKey": "memo", + "defName": "备注", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "8AF726FB-0918-4FED-A0D0-604C48B01ADD", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "645CB92C-145B-4560-A43D-4C8AAE35CF32", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "8F95481B-367D-49E7-9961-9A281119D2D1", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "B5425FB8-A01B-4148-8BF3-91A57F8B30C9", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "8D44484E-F903-4914-9507-BC8A45400FAD", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + } + ], + "indexes": [] + }, + { + "id": "1CD9AEA6-DAB8-40DF-8318-BCA343176C13", + "schemaName": null, + "defKey": "cost_config", + "defName": "cost_config", + "intro": "", + "type": "P", + "fields": [ + { + "id": "7871BAC5-9C1E-45D3-A150-5D4C9B2D9772", + "defKey": "id", + "defName": "Id", + "intro": "", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 1, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "4FDB3C56-9FFA-4A13-AE1A-E764AE66431C", + "defKey": "cost_strategy", + "defName": "计费策略", + "intro": "字典代码:cost_strategy", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 64, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "cost_strategy", + "stndFieldId": "", + "stndDictKey": "cost_strategy", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "Dun", + "itemName": "按吨", + "parentKey": "", + "intro": "", + "id": "17C1DC4B-B707-4DAD-8B24-484838F9C157" + }, + { + "itemKey": "Che", + "itemName": "按方", + "parentKey": "", + "intro": "", + "id": "CC0058F6-02CA-4645-9FEF-9143833C2964" + }, + { + "itemKey": "Fang", + "itemName": "按距离", + "parentKey": "", + "intro": "", + "id": "024EEBD1-5C0E-4AA4-A5EA-3E2BAA80628A" + }, + { + "itemKey": "Juli", + "itemName": "按车", + "parentKey": "", + "intro": "", + "id": "34D2FFAC-CB4B-4E3B-8125-6605491E95A8" + }, + { + "itemKey": "TanXing", + "itemName": "弹性", + "parentKey": "", + "intro": "", + "id": "B247787C-6787-41E8-BADD-5F155C62B7A9" + } + ], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "AA6A0858-0789-4ABA-B055-CD3F39C1A4D6", + "defKey": "tax_rate", + "defName": "税率", + "intro": "", + "baseDataType": "DECIMAL", + "bizDomainType": "", + "dbDataType": "DECIMAL", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "57999358-5DCB-400E-8A77-8F3A62665A9F", + "defKey": "payer", + "defName": "付费方", + "intro": "字典代码:payer", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "payer", + "stndFieldId": "", + "stndDictKey": "payer", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "Manual", + "dictItems": [ + { + "itemKey": "PingTai", + "itemName": "平台", + "parentKey": "", + "intro": "", + "id": "F9E5B2B3-3E58-4B22-88F6-C3925BDD4EFF" + }, + { + "itemKey": "ChanFei", + "itemName": "产废方", + "parentKey": "", + "intro": "", + "id": "DAE6A790-C2D0-4972-9491-FEAF67E5B00C" + }, + { + "itemKey": "QingYun", + "itemName": "清运方", + "parentKey": "", + "intro": "", + "id": "BDD02160-F9E7-4E0B-A227-008E0E0DCBB9" + }, + { + "itemKey": "XiaoNa", + "itemName": "消纳方", + "parentKey": "", + "intro": "", + "id": "19C7D008-74BD-4478-8705-D5EB03C54DA5" + } + ], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "5A28A88A-E522-47C6-A63E-01FF12177651", + "defKey": "canuse", + "defName": "是否可用", + "intro": "0-->否、1-->是", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "301FA013-39AE-44C3-BF16-5C0A0B9E8355", + "defKey": "unit", + "defName": "单位", + "intro": "字典代码:unit", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "38341EB7-4DE1-4AAC-955D-B0B3F08E54CC", + "defKey": "unit_price", + "defName": "单价", + "intro": "单位:元,弹性模式-->每档价格", + "baseDataType": "DECIMAL", + "bizDomainType": "", + "dbDataType": "DECIMAL", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0.0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "2356F174-F3CE-4F53-9243-DC25BF41609D", + "defKey": "initial_price", + "defName": "起步价", + "intro": "单位:元,<= 起步量 固定费用", + "baseDataType": "DECIMAL", + "bizDomainType": "", + "dbDataType": "DECIMAL", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0.0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "4F1B1CE5-54FF-4161-A825-95A6DF9DF02E", + "defKey": "initial_quantity", + "defName": "起步量", + "intro": "", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "A0020FCD-FCA7-42E8-AAEB-871E1878A482", + "defKey": "every_quantity", + "defName": "每档的量", + "intro": "", + "baseDataType": "INT", + "bizDomainType": "", + "dbDataType": "INT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "41DD32FB-F933-4C6E-B990-E543EBDE9D63", + "defKey": "memo", + "defName": "备注", + "intro": "", + "baseDataType": "VARCHAR", + "bizDomainType": "", + "dbDataType": "VARCHAR", + "dataLen": 512, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "''", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "UI" + }, + { + "id": "99DEE8B8-55C9-4F64-9423-12F9AFB761CD", + "defKey": "creator_id", + "defName": "创建人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": null, + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "09D256B0-1AA9-41C2-8EA1-90739E21AD2C", + "defKey": "modifier_id", + "defName": "修改人 Id", + "intro": " sys_user.id", + "baseDataType": "BIGINT", + "bizDomainType": "", + "dbDataType": "BIGINT", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "93952EEE-BDD1-4C8D-B795-D24A1E75B7C9", + "defKey": "create_time", + "defName": "创建时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "251BA67A-9180-4ECB-BFD2-ACB590CFB138", + "defKey": "modify_time", + "defName": "修改时间", + "intro": "", + "baseDataType": "DATETIME", + "bizDomainType": "", + "dbDataType": "DATETIME", + "dataLen": "", + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + }, + { + "id": "E238E302-DAB7-4D0C-A5F8-ED959105CA58", + "defKey": "deleted", + "defName": "是否删除", + "intro": " 0-->未删除、1-->已删除", + "baseDataType": "TINYINT", + "bizDomainType": "", + "dbDataType": "TINYINT", + "dataLen": 1, + "numScale": "", + "primaryKey": 0, + "notNull": 1, + "autoIncrement": 0, + "defaultValue": "0", + "stndDictId": "", + "stndFieldId": "", + "stndDictKey": "", + "stndFieldKey": "", + "stndComplianceLevel": "", + "stndComplianceType": "", + "dictFrom": "", + "dictItems": [], + "fieldTier": "", + "mark": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "attr10": "", + "attr11": "", + "attr12": "", + "attr13": "", + "attr14": "", + "attr15": "", + "attr16": "", + "attr17": "", + "attr18": "PDManer", + "attr19": "", + "attr20": "", + "origin": "PASTE" + } + ], + "indexes": [] + } + ], + "diagrams": [], + "readonly": false, + "allowWs": false + }, + "updateTime": 1764576011193, + "signature": "5a04596e8231748f7af750043551f42e", + "branchId": "1111" +} \ No newline at end of file