{
  "name": "兴元",
  "describe": "兴元",
  "avatar": "",
  "version": "4.2.2",
  "createdTime": "2022-12-7 11:31:47",
  "updatedTime": "2022-12-19 09:04:47",
  "dbConns": [],
  "profile": {
    "default": {
      "db": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
      "dbConn": "D4843C6A-F7EC-480D-A8DB-4F6655F65F92",
      "entityInitFields": [],
      "entityInitProperties": {
        "partitioned by": "(date string)",
        "row format delimited": "",
        "fields terminated by ','": "",
        "collection items terminated by '-'": "",
        "map keys terminated by ':'": "",
        "store as textfile;": ""
      }
    },
    "javaHome": "",
    "sql": {
      "delimiter": ""
    },
    "dataTypeSupports": [
      {
        "defKey": "MYSQL",
        "id": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E"
      },
      {
        "defKey": "ORACLE",
        "id": "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542"
      },
      {
        "defKey": "SQLServer",
        "id": "BFC87171-C74F-494A-B7C2-76B9C55FACC9"
      },
      {
        "defKey": "PostgreSQL",
        "id": "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022"
      },
      {
        "defKey": "DB2",
        "id": "89504F5D-94BF-4C9E-8B2E-44F37305FED5"
      },
      {
        "defKey": "DM",
        "id": "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307"
      },
      {
        "defKey": "GaussDB",
        "id": "592C7013-143D-4E7B-AF64-0D7BF1E28230"
      },
      {
        "defKey": "Kingbase",
        "id": "77BD85E5-9D0D-4096-8427-CBA306FC9C6A"
      },
      {
        "defKey": "MaxCompute",
        "id": "11D1FB71-A587-4217-89BA-611B8A1F83E0"
      },
      {
        "defKey": "SQLite",
        "id": "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1"
      },
      {
        "defKey": "JAVA",
        "id": "797A1496-D649-4261-89B4-544132EC3F36"
      },
      {
        "defKey": "JavaMybatis",
        "id": "895CFD1D-4273-4D32-A2C4-CAC70200AB5B"
      },
      {
        "defKey": "JavaMybatisPlus",
        "id": "A2EE7B4A-CE62-4290-B00C-B26C1BF18073"
      },
      {
        "defKey": "C#",
        "id": "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30"
      },
      {
        "defKey": "Hive",
        "id": "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2"
      },
      {
        "defKey": "Golang",
        "id": "B91D99E0-9B7C-416C-8737-B760957DAF09"
      },
      {
        "defKey": "Rust",
        "id": "BDF457FD-9F98-4AC3-A705-7587B00A3BAB"
      }
    ],
    "codeTemplates": [
      {
        "type": "appCode",
        "applyFor": "797A1496-D649-4261-89B4-544132EC3F36",
        " JpaBean": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport javax.persistence.*;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@Table(name=\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    {{? field.primaryKey }}\n    @Id\n    @GeneratedValue\n    {{?}}\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n        return this.{{=it.func.camel(field.defKey,false)}};\n    }\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n        this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n    }\n{{~}}\n}"
      },
      {
        "type": "appCode",
        "applyFor": "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30",
        "Default": "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.entity.defName,it.entity.comment,'-')}}\n */\nnamespace PDManer.Application\n{\n    public partial class {{=it.func.camel(it.entity.defKey,true) }}\n    {\n    \n        {{~it.entity.fields:field:index}}\n        /// <summary>\n        /// {{=it.func.join(field.defName,field.comment,';')}}\n        /// </summary>\n        public {{=field.type}} {{=it.func.camel(field.defKey,true)}} { get; set; }\n        $blankline\n        {{~}}\n        \n    }\n}",
        "SqlSugar": "using System;\nusing System.Collections.Generic;\nusing SqlSugar;\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    var sqlSugartable='[SugarTable(\"{{=it.entity.defKey}}\", TableDescription = \"{{=it.func.join(it.entity.defName,it.entity.comment,';')}}\")]';\n}}\n/*\n * @author : xkdong@163.com\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n * @desc : {{=it.func.join(it.entity.defName,it.entity.comment,'-')}}\n */\nnamespace Model.DBModel\n{\n    /// <summary>\n    /// {{=it.func.join(it.entity.defName,it.entity.comment,';')}}\n    /// </summary>\n    {{=sqlSugartable}}\n    public class {{=it.entity.defKey}}\n    {\n        {{~it.entity.fields:field:index}}\n        /// <summary>\n        /// {{=it.func.join(field.defName,field.comment,';')}}\n        /// </summary>\n        {{? field.primaryKey }}\n        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]\n        {{?}}\n        public {{=field.type}} {{=it.func.camel(field.defKey,true)}}{ get; set; }\n        $blankline\n        {{~}}\n    }\n}"
      },
      {
        "applyFor": "895CFD1D-4273-4D32-A2C4-CAC70200AB5B",
        "type": "appCode",
        "Controller": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.controller;\n$blankline\nimport io.swagger.annotations.Api;\nimport io.swagger.annotations.ApiOperation;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageRequest;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.*;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.service.{{=serviceClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Api(tags = \"{{=it.entity.defName}}对象功能接口\")\n@RestController\n@RequestMapping(\"/{{=it.func.camel(it.entity.defKey,false)}}\")\npublic class {{=beanClass}}Controller{\n    @Autowired\n    private {{=serviceClass}} {{=serviceVarName}};\n    $blankline\n    /** \n     * 通过ID查询单条数据 \n     *\n     * @param {{=pkVarName}} 主键\n     * @return 实例对象\n     */\n    @ApiOperation(\"通过ID查询单条数据\")\n    @GetMapping(\"{{{=it.func.camel(pkVarName,false)}}}\")\n    public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\n    }\n    $blankline\n    /** \n     * 分页查询\n     *\n     * @param {{=beanVarName}} 筛选条件\n     * @param pageRequest 分页对象\n     * @return 查询结果\n     */\n    @ApiOperation(\"分页查询\")\n    @GetMapping\n    public ResponseEntity<Page<{{=beanClass}}>> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n        return ResponseEntity.ok({{=serviceVarName}}.paginQuery({{=beanVarName}}, pageRequest));\n    }\n    $blankline\n    /** \n     * 新增数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    @ApiOperation(\"新增数据\")\n    @PostMapping\n    public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\n    }\n    $blankline\n    /** \n     * 更新数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    @ApiOperation(\"更新数据\")\n    @PutMapping\n    public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\n    }\n    $blankline\n    /** \n     * 通过主键删除数据\n     *\n     * @param {{=pkVarName}} 主键\n     * @return 是否成功\n     */\n    @ApiOperation(\"通过主键删除数据\")\n    @DeleteMapping\n    public ResponseEntity<Boolean> deleteById({{=pkDataType}} {{=pkVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\n    }\n}",
        "Service": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.service;\n$blankline\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageRequest;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\npublic interface {{=serviceClass}}{\n    /** \n     * 通过ID查询单条数据 \n     *\n     * @param {{=pkVarName}} 主键\n     * @return 实例对象\n     */\n    {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n    \n    /** \n     * 分页查询\n     *\n     * @param {{=beanVarName}} 筛选条件\n     * @param pageRequest 分页对象\n     * @return 查询结果\n     */\n    Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest);\n\n    /** \n     * 新增数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\n\n    \n    /** \n     * 更新数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\n\n    /** \n     * 通过主键删除数据\n     *\n     * @param {{=pkVarName}} 主键\n     * @return 是否成功\n     */\n    boolean deleteById({{=pkDataType}} {{=pkVarName}});\n}",
        "ServiceImpl": "{{  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 pkVarNameU = \"UndefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkVarNameU = it.func.camel(field.defKey,true);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    var mapperName = beanVarName+'Mapper';\n    \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageImpl;\nimport org.springframework.data.domain.PageRequest;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\n    @Autowired\n    private {{=beanClass}}Mapper {{=mapperName}};\n    $blankline\n    /** \n     * 通过ID查询单条数据 \n     *\n     * @param {{=pkVarName}} 主键\n     * @return 实例对象\n     */\n    public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\n        return {{=mapperName}}.queryById({{=pkVarName}});\n    }\n    $blankline\n    /** \n     * 分页查询\n     *\n     * @param {{=beanVarName}} 筛选条件\n     * @param pageRequest 分页对象\n     * @return 查询结果\n     */\n    public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n        long total = {{=mapperName}}.count({{=beanVarName}});\n        return new PageImpl<>({{=mapperName}}.queryAllByLimit({{=beanVarName}}, pageRequest), pageRequest, total);\n    }\n    $blankline\n    /** \n     * 新增数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\n        {{=mapperName}}.insert({{=beanVarName}});\n        return {{=beanVarName}};\n    }\n    $blankline\n    /** \n     * 更新数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\n        {{=mapperName}}.update({{=beanVarName}});\n        return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\n    }\n    $blankline\n    /** \n     * 通过主键删除数据\n     *\n     * @param {{=pkVarName}} 主键\n     * @return 是否成功\n     */\n    public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\n        int total = {{=mapperName}}.deleteById({{=pkVarName}});\n        return total > 0;\n    }\n}",
        "Mapper": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.mapper;\n$blankline\nimport java.util.List;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport org.springframework.data.domain.Pageable;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper{\n    /** \n     * 通过ID查询单条数据 \n     *\n     * @param {{=pkVarName}} 主键\n     * @return 实例对象\n     */\n    {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n    \n    /** \n     * 分页查询指定行数据\n     *\n     * @param {{=beanVarName}} 查询条件\n     * @param pageable 分页对象\n     * @return 对象列表\n     */\n    List<{{=beanClass}}> queryAllByLimit({{=beanClass}} {{=beanVarName}}, @Param(\"pageable\") Pageable pageable);\n\n    /** \n     * 统计总行数\n     *\n     * @param {{=beanVarName}} 查询条件\n     * @return 总行数\n     */\n    long count({{=beanClass}} {{=beanVarName}});\n\n    /** \n     * 新增数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 影响行数\n     */\n    int insert({{=beanClass}} {{=beanVarName}});\n\n    /** \n     * 批量新增数据\n     *\n     * @param entities List<{{=beanClass}}> 实例对象列表\n     * @return 影响行数\n     */\n    int insertBatch(@Param(\"entities\") List<{{=beanClass}}> entities);\n    \n    /** \n     * 批量新增或按主键更新数据\n     *\n     * @param entities List<{{=beanClass}}> 实例对象列表\n     * @return 影响行数\n     */\n    int insertOrUpdateBatch(@Param(\"entities\") List<{{=beanClass}}> entities);\n    \n    /** \n     * 更新数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 影响行数\n     */\n    int update({{=beanClass}} {{=beanVarName}});\n\n    /** \n     * 通过主键删除数据\n     *\n     * @param {{=pkVarName}} 主键\n     * @return 影响行数\n     */\n    int deleteById({{=pkDataType}} {{=pkVarName}});\n}",
        "Mapper.xml": "{{  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    var pkField = \"UNDEFINED_ID\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkField = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n    <resultMap type=\"{{=pkgName}}.entity.{{=beanClass}}\" id=\"{{=beanClass}}Map\">\n    {{~it.entity.fields:field:index}}\n        <result property=\"{{=it.func.camel(field.defKey,false)}}\" column=\"{{=field.defKey}}\" jdbcType=\"{{=field.dbType}}\"/>\n    {{~}}\n    </resultMap>\n    $blankline\n    <!-- 通过ID查询单条数据 -->\n    <select id=\"queryById\" resultMap=\"{{=beanClass}}Map\">\n        select\n            {{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}}\n        from {{=it.entity.defKey}}\n        where {{=pkField}} = #{{{=pkVarName}}}\n    </select>\n    $blankline\n    <!--分页查询指定行数据-->\n    <select id=\"queryAllByLimit\" resultMap=\"{{=beanClass}}Map\">\n        select\n            {{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}}\n        from {{=it.entity.defKey}}\n        <where>\n        {{~it.entity.fields:field:index}}\n            <if test=\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != ''\">\n                and {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}}\n            </if>\n        {{~}}\n        </where>\n        limit #{pageable.offset}, #{pageable.pageSize}\n    </select>\n    $blankline\n    <!--统计总行数-->\n    <select id=\"count\" resultType=\"java.lang.Long\">\n        select count(1)\n        from {{=it.entity.defKey}}\n        <where>\n        {{~it.entity.fields:field:index}}\n            <if test=\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != ''\">\n                and {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}}\n            </if>\n        {{~}}\n        </where>\n    </select>\n    $blankline\n    <!--新增数据-->\n    <insert id=\"insert\" keyProperty=\"{{=pkField}}\" useGeneratedKeys=\"true\">\n        insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n        values ({{=it.entity.fields.map(function(e,i){return '#{'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n    </insert>\n    $blankline\n    <!-- 批量新增数据 -->\n    <insert id=\"insertBatch\" keyProperty=\"{{=pkField}}\" useGeneratedKeys=\"true\">\n        insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n        values\n        <foreach collection=\"entities\" item=\"entity\" separator=\",\">\n            ({{=it.entity.fields.map(function(e,i){return '#{entity.'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n        </foreach>\n    </insert>\n    $blankline\n    <!-- 批量新增或按主键更新数据 -->\n    <insert id=\"insertOrUpdateBatch\" keyProperty=\"{{=pkField}}\" useGeneratedKeys=\"true\">\n        insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n        values\n        <foreach collection=\"entities\" item=\"entity\" separator=\",\">\n            ({{=it.entity.fields.map(function(e,i){return '#{entity.'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n        </foreach>\n        on duplicate key update\n        {{=it.entity.fields.map(function(e,i){return e.defKey + '=values('+e.defKey+')'}).join(',\\n\\t\\t')}}\n    </insert>\n    $blankline\n    <!-- 更新数据 -->\n    <update id=\"update\">\n        update {{=it.entity.defKey}}\n        <set>\n        {{~it.entity.fields:field:index}}\n            <if test=\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != ''\">\n                {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}},\n            </if>\n        {{~}}\n        </set>\n        where {{=pkField}} = #{{{=pkVarName}}}\n    </update>\n    $blankline\n    <!--通过主键删除-->\n    <delete id=\"deleteById\">\n        delete from {{=it.entity.defKey}} where {{=pkField}} = #{{{=pkVarName}}}\n    </delete>\n</mapper>\n\n",
        "Entity": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n        return this.{{=it.func.camel(field.defKey,false)}};\n    }\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n        this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n    }\n{{~}}\n}"
      },
      {
        "applyFor": "A2EE7B4A-CE62-4290-B00C-B26C1BF18073",
        "type": "appCode",
        "Controller": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.controller;\n$blankline\nimport java.util.List;\nimport io.swagger.annotations.Api;\nimport io.swagger.annotations.ApiOperation;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.data.domain.PageImpl;\nimport org.springframework.data.domain.PageRequest;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.*;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.service.{{=serviceClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Api(tags = \"{{=it.entity.defName}}对象功能接口\")\n@RestController\n@RequestMapping(\"/{{=it.func.camel(it.entity.defKey,false)}}\")\npublic class {{=beanClass}}Controller{\n    @Autowired\n    private {{=serviceClass}} {{=serviceVarName}};\n    $blankline\n    /** \n     * 通过ID查询单条数据 \n     *\n     * @param {{=pkVarName}} 主键\n     * @return 实例对象\n     */\n    @ApiOperation(\"通过ID查询单条数据\")\n    @GetMapping(\"{{{=it.func.camel(pkVarName,false)}}}\")\n    public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\n    }\n    $blankline\n    /** \n     * 分页查询\n     *\n     * @param {{=beanVarName}} 筛选条件\n     * @param pageRequest 分页对象\n     * @return 查询结果\n     */\n    @ApiOperation(\"分页查询\")\n    @GetMapping\n    public ResponseEntity<PageImpl<{{=beanClass}}>> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n        //1.分页参数\n        long current = pageRequest.getPageNumber();\n        long size = pageRequest.getPageSize();\n\n        //2.分页查询\n        /*把Mybatis的分页对象做封装转换，MP的分页对象上有一些SQL敏感信息，还是通过spring的分页模型来封装数据吧*/\n        com.baomidou.mybatisplus.extension.plugins.pagination.Page<{{=beanClass}}> pageResult = {{=serviceVarName}}.paginQuery({{=beanVarName}}, current,size);\n\n        //3. 分页结果组装\n        List<{{=beanClass}}> dataList = pageResult.getRecords();\n        long total = pageResult.getTotal();\n        PageImpl<{{=beanClass}}> retPage = new PageImpl<{{=beanClass}}>(dataList,pageRequest,total);\n        return ResponseEntity.ok(retPage);\n    }\n    $blankline\n    /** \n     * 新增数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    @ApiOperation(\"新增数据\")\n    @PostMapping\n    public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\n    }\n    $blankline\n    /** \n     * 更新数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    @ApiOperation(\"更新数据\")\n    @PutMapping\n    public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\n    }\n    $blankline\n    /** \n     * 通过主键删除数据\n     *\n     * @param {{=pkVarName}} 主键\n     * @return 是否成功\n     */\n    @ApiOperation(\"通过主键删除数据\")\n    @DeleteMapping\n    public ResponseEntity<Boolean> deleteById({{=pkDataType}} {{=pkVarName}}){\n        return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\n    }\n}",
        "Service": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.service;\n$blankline\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\npublic interface {{=serviceClass}}{\n    $blankline\n    /** \n     * 通过ID查询单条数据 \n     *\n     * @param {{=pkVarName}} 主键\n     * @return 实例对象\n     */\n    {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n    $blankline\n    /**\n     * 分页查询\n     *\n     * @param {{=beanVarName}} 筛选条件\n     * @param current 当前页码\n     * @param size  每页大小\n     * @return\n     */\n    Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size);\n\n    /** \n     * 新增数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\n\n    \n    /** \n     * 更新数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\n\n    /** \n     * 通过主键删除数据\n     *\n     * @param {{=pkVarName}} 主键\n     * @return 是否成功\n     */\n    boolean deleteById({{=pkDataType}} {{=pkVarName}});\n}",
        "ServiceImpl": "{{  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 pkVarNameU = \"UndefinedId\";\n    var pkFieldKey = \"UNDEFINED\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkFieldKey = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkVarNameU = it.func.camel(field.defKey,true);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    var mapperName = beanVarName+'Mapper';\n    \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport cn.hutool.core.util.StrUtil;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;\nimport com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;\n\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\n    @Autowired\n    private {{=beanClass}}Mapper {{=mapperName}};\n    $blankline\n    /** \n     * 通过ID查询单条数据 \n     *\n     * @param {{=pkVarName}} 主键\n     * @return 实例对象\n     */\n    public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\n        return {{=mapperName}}.selectById({{=pkVarName}});\n    }\n    $blankline\n    /**\n     * 分页查询\n     *\n     * @param {{=beanVarName}} 筛选条件\n     * @param current 当前页码\n     * @param size  每页大小\n     * @return\n     */\n    public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size){\n        //1. 构建动态查询条件\n        LambdaQueryWrapper<{{=beanClass}}> queryWrapper = new LambdaQueryWrapper<>();\n        {{~it.entity.fields.filter(function(e){return e[\"type\"]===\"String\"&&e.defKey !== pkFieldKey}):field:index}}\n        if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\n            queryWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\n        }\n        {{~}}\n\n        //2. 执行分页查询\n        Page<{{=beanClass}}> pagin = new Page<>(current , size , true);\n        IPage<{{=beanClass}}> selectResult = {{=mapperName}}.selectByPage(pagin , queryWrapper);\n        pagin.setPages(selectResult.getPages());\n        pagin.setTotal(selectResult.getTotal());\n        pagin.setRecords(selectResult.getRecords());\n\n        //3. 返回结果\n        return pagin;\n    }\n    $blankline\n    /** \n     * 新增数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\n        {{=mapperName}}.insert({{=beanVarName}});\n        return {{=beanVarName}};\n    }\n    $blankline\n    /** \n     * 更新数据\n     *\n     * @param {{=beanVarName}} 实例对象\n     * @return 实例对象\n     */\n    public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\n        //1. 根据条件动态更新\n        LambdaUpdateChainWrapper<{{=beanClass}}> chainWrapper = new LambdaUpdateChainWrapper<{{=beanClass}}>({{=mapperName}});\n        {{~it.entity.fields.filter(function(e){return e[\"type\"]===\"String\"&&e.defKey !== pkFieldKey}):field:index}}\n        if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\n            chainWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\n        }\n        {{~}}\n        //2. 设置主键，并更新\n        chainWrapper.set({{=beanClass}}::get{{=pkVarNameU}}, {{=beanVarName}}.get{{=pkVarNameU}}());\n        boolean ret = chainWrapper.update();\n        //3. 更新成功了，查询最最对象返回\n        if(ret){\n            return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\n        }else{\n            return {{=beanVarName}};\n        }\n    }\n    $blankline\n    /** \n     * 通过主键删除数据\n     *\n     * @param {{=pkVarName}} 主键\n     * @return 是否成功\n     */\n    public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\n        int total = {{=mapperName}}.deleteById({{=pkVarName}});\n        return total > 0;\n    }\n}",
        "Mapper": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.mapper;\n$blankline\n\nimport com.baomidou.mybatisplus.core.conditions.Wrapper;\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.baomidou.mybatisplus.core.toolkit.Constants;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper  extends BaseMapper<{{=beanClass}}>{\n    /** \n     * 分页查询指定行数据\n     *\n     * @param page 分页参数\n     * @param wrapper 动态查询条件\n     * @return 分页对象列表\n     */\n    IPage<{{=beanClass}}> selectByPage(IPage<{{=beanClass}}> page , @Param(Constants.WRAPPER) Wrapper<{{=beanClass}}> wrapper);\n}",
        "Mapper.xml": "{{  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    var pkField = \"UNDEFINED_ID\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkField = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n$blankline\n\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n     <select id=\"selectByPage\" resultType=\"{{=pkgName}}.entity.{{=beanClass}}\">\n        select * from user ${ew.customSqlSegment}\n    </select>\n</mapper>\n\n",
        "Entity": "{{  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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n        return this.{{=it.func.camel(field.defKey,false)}};\n    }\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n        this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n    }\n{{~}}\n}"
      },
      {
        "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
        "type": "dbDDL",
        "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    `{{=field.defKey}}` {{=field.dbType}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }} COMMENT '{{=it.func.join(field.defName,field.comment,';')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n)  COMMENT = '{{=it.func.join(it.entity.defName,it.entity.comment,';') }}';\n$blankline\n",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
        "deleteTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "deleteIndex": "{{~ it.entity.indexes:index}}\nDROP INDEX IF EXISTS {{=index.defKey}} ;\n{{~}}",
        "message": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChanged(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n        }\n        if(before.defName !== after.defName){\n            ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n        }\n        if(before.comment !== after.comment){\n            ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n        }\n        if(ret.length>0){\n            return '    基本信息:\\n\\t'+ret.join('\\n\\t');\n        }\n        return '';\n    };\n    \n    function buildAddedDesc(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        \n        for (let field of fieldAdded) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildRemovedDesc(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        \n        for (let field of fieldRemoved) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildModifiedDesc(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        for (let field1 of fieldModified) { \n            let row = [];\n            let field = field1.before;\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n    {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n    修改字段：\n    {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n        /*计算是否调整了属性*/\n        let propAdded = entity.data.propAdded || [];\n        let propRemoved = entity.data.propRemoved || [];\n        let propModified = entity.data.propModified || [];\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n        /*计算关联是否调整*/\n        let refEntityAdd = entity.data.refEntityAdd || [];\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\n        let relaArray = [];\n        for (let rela of refEntityAdd) {\n            relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        for (let rela of refEntityRemoved) {\n            relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        /*索引是否修改过*/\n        let indexChanged = entity.data.indexChanged;\n    }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n    添加字段：\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n    删除字段：\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}\n",
        "update": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChangedDDL(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push('ALTER TABLE '+before.defKey+' RENAME TO '+after.defKey);\n        }\n        let commentText = '';\n        let commentChanged = false;\n        if(before.defName !== after.defName){\n            commentText = after.defName;\n            commentChanged = true;\n        }\n        if(before.comment !== after.comment){\n            commentChanged = true;\n            if(commentText){\n                commentText = (commentText+ ';'+after.comment)\n            }else{\n                commentText = after.comment\n            }\n        }\n        if(commentChanged){\n            ret.push('ALTER TABLE '+after.defKey+' COMMENT \\''+commentText+'\\'');\n        }\n        let baseText = '-- 基本信息:\\n';\n        return baseText+ret.join(';\\n')+';';\n    };\n    \n    function buildAddedDDL(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        if(fieldAdded.length == 0){\n            return '';\n        }\n        \n        let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n        for (let field of fieldAdded) { \n            let ddlItem = 'ADD COLUMN `'+field.defKey+'` '+field.dbType;\n            /*处理数据类型长度*/\n            if(field.len>0){\n                ddlItem += ('('+field.len);\n                if(parseInt(field.scale)>0){\n                    ddlItem += (','+field.scale);\n                }\n                ddlItem += ')';\n            }\n            if(field.notNull){\n                ddlItem += ' NOT NULL';\n            }\n            if(field.autoIncrement){\n                ddlItem += ' AUTO_INCREMENT';\n            }\n            if(field.defaultValue){\n                ddlItem += (' DEFAULT ' + field.defaultValue);\n            }\n            ddlItem += (' COMMENT \\''+field.defName+';'+field.comment+'\\'');\n            \n            if(field.index>0 && field.afterFieldKey){\n                ddlItem += (' AFTER '+field.afterFieldKey);\n            }\n            ret.push(ddlItem);\n        }\n        return firstDDL+'\\n'+ret.join(',\\n');\n    };\n    \n    function buildRemovedDDL(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        if(fieldRemoved.length == 0){\n            return '';\n        }\n        \n        let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n        for (let field of fieldRemoved) { \n            ret.push('DROP '+field.defKey);\n        }\n        return firstDDL+'\\n'+ret.join(',\\n');\n    };\n    \n    function buildModifiedDDL(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n        for (let field of fieldModified) { \n            let changeDDL = '';\n            let before = field.before || {};\n            let after = field.after || {};\n            if(before.defKey === after.defKey){\n                changeDDL += (' MODIFY COLUMN `'+after.defKey+'`');\n            }else{\n                changeDDL += (' CHANGE COLUMN `'+before.defKey+'` `'+after.defKey+'`');\n            }\n            changeDDL += (' '+after.dbType);\n            if(after.len>0){\n                changeDDL += ('('+after.len);\n                if(parseInt(after.scale)>0){\n                    changeDDL += (','+after.scale);\n                }\n                changeDDL += ')';\n            }\n            if(after.notNull){\n                changeDDL += ' NOT NULL';\n            }\n            let defaultValue = '';\n            if(after.defaultValue != null && after.defaultValue.length>0){\n                defaultValue = (after.defaultValue);\n            }else{\n                defaultValue = 'NULL';\n            }\n            if(defaultValue != 'NULL'){\n                changeDDL += (' DEFAULT ' + defaultValue);\n            }\n\n            let comment = after.defName;\n            if(after.comment){\n                comment = comment + ';' + (after.comment||'');\n            }\n            if(comment){\n                changeDDL += (' COMMENT \\''+comment+'\\';');\n            }\n            \n            ret.push(firstDDL+' '+changeDDL);\n        }\n        return ret;\n    };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段：\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段：\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段：\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
      },
      {
        "applyFor": "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542",
        "type": "dbDDL",
        "createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
        "deleteTable": "DROP TABLE {{=it.entity.defKey}};",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "deleteIndex": "{{~ it.entity.indexes:index}}\nDROP INDEX {{=index.defKey}} ;\n{{~}}",
        "message": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChanged(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n        }\n        if(before.defName !== after.defName){\n            ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n        }\n        if(before.comment !== after.comment){\n            ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n        }\n        if(ret.length>0){\n            return '    基本信息:\\n\\t'+ret.join('\\n\\t');\n        }\n        return '';\n    };\n    \n    function buildAddedDesc(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        \n        for (let field of fieldAdded) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildRemovedDesc(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        \n        for (let field of fieldRemoved) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildModifiedDesc(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        for (let field1 of fieldModified) { \n            let row = [];\n            let field = field1.before;\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* -------------------------------------------------- */\n创建表：\n{{~ createEntities:entity}}\n    {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* -------------------------------------------------- */\n删除表：\n{{~ dropEntities:entity}}\n    {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* -------------------------------------------------- */\n修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n    {{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n    添加字段：\n    {{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n    {{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n    删除字段：\n    {{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n    {{?}}{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n    修改字段：\n    {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}\n    {{?}}{{\n        /*计算是否调整了属性*/\n        let propAdded = entity.data.propAdded || [];\n        let propRemoved = entity.data.propRemoved || [];\n        let propModified = entity.data.propModified || [];\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n        /*计算关联是否调整*/\n        let refEntityAdd = entity.data.refEntityAdd || [];\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\n        let relaArray = [];\n        for (let rela of refEntityAdd) {\n            relaArray.push('\\n\\t建立关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        for (let rela of refEntityRemoved) {\n            relaArray.push('\\n\\t解除关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        /*索引是否修改过*/\n        let indexChanged = entity.data.indexChanged;\n    }}\n{{=indexChanged?'\\n\\t更改了索引':''}}\n{{=changed?'\\n\\t更改了属性':''}}\n{{=relaArray.length>0?relaArray.join(''):''}}\n{{~}}\n{{?}}",
        "update": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChangedDDL(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\n        }\n        let commentText = '';\n        let commentChanged = false;\n        if(before.defName !== after.defName){\n            commentText = after.defName;\n            commentChanged = true;\n        }\n        if(before.comment !== after.comment){\n            commentChanged = true;\n            if(commentText){\n                commentText = (commentText+ ';'+after.comment)\n            }else{\n                commentText = after.comment\n            }\n        }\n        if(commentChanged){\n            let myText = `COMMENT ON TABLE ${after.defKey} IS '${commentText}'`;\n            ret.push(myText);\n        }\n        let baseText = '-- 基本信息:\\n';\n        return baseText+ret.join(';\\n')+';';\n    };\n    \n    function buildAddedDDL(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        if(fieldAdded.length == 0){\n            return '';\n        }\n        \n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n        for (let field of fieldAdded) { \n            let ddlItem = `ADD (${field.defKey} ${field.dbType}`;\n            /*处理数据类型长度*/\n            if(field.len>0){\n                ddlItem += ('('+field.len);\n                if(parseInt(field.scale)>0){\n                    ddlItem += (','+field.scale);\n                }\n                ddlItem += ')';\n            }\n            let defaultValue = field.defaultValue;\n            defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n            if(defaultValue.length>0){\n                ddlItem += (' DEFAULT ' + defaultValue);\n            }\n            if(field.notNull){\n                ddlItem += ' NOT NULL';\n            }\n            ddlItem += ')';\n            ret.push(`${firstDDL} ${ddlItem}`);\n            \n            /*处理字段注释*/\n            let fieldComments = [];\n            if(field.defName != null &&field.defName.length>0){\n                fieldComments.push(field.defName);\n            }\n            if(field.comment != null &&field.comment.length>0){\n                fieldComments.push(field.comment);\n            }\n            let commentText = fieldComments.join(';');\n            if(commentText != null && commentText.length > 0){\n                let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS '${commentText}'`;\n                 ret.push(commentDDL);\n            }\n        }\n        return '\\n'+ret.join(';\\n');\n    };\n    \n    function buildRemovedDDL(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        if(fieldRemoved.length == 0){\n            return '';\n        }\n        \n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n        for (let field of fieldRemoved) { \n            ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\n        }\n        return '\\n'+ret.join(';\\n');\n    };\n    \n    function buildModifiedDDL(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n        for (let field of fieldModified) { \n            let changeDDL = '';\n            let before = field.before || {};\n            let after = field.after || {};\n            if(before.defKey !== after.defKey){\n                let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\n                ret.push(renameText);\n            }\n            /*如果没有变化，则不生成变更语句*/\n            if(before.dbType === after.dbType \n            && before['len'] === after['len'] \n            && before.scale === after.scale\n            && before.primaryKey === after.primaryKey\n            && before.notNull === after.notNull\n            && before.autoIncrement === after.autoIncrement\n            && before.defaultValue === after.defaultValue){\n                continue;\n            }\n            changeDDL += ('MODIFY ('+after.defKey+'');\n            changeDDL += (' '+after.dbType);\n            if(after.len>0){\n                changeDDL += ('('+after.len);\n                if(parseInt(after.scale)>0){\n                    changeDDL += (','+after.scale);\n                }\n                changeDDL += ')';\n            }\n            let defaultValue = after.defaultValue;\n            defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n            if(defaultValue.length>0){\n                changeDDL += (' DEFAULT ' + defaultValue);\n            }\n            \n            if(after.notNull){\n                changeDDL += ' NOT NULL';\n            }\n            changeDDL += ')';\n            ret.push(`${firstDDL} ${changeDDL};`);\n        }\n        return ret;\n    };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段：\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段：\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段：\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
      },
      {
        "applyFor": "BFC87171-C74F-494A-B7C2-76B9C55FACC9",
        "type": "dbDDL",
        "createTable": "IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[{{=it.entity.defKey}}]') AND type in (N'U')) DROP TABLE [dbo].[{{=it.entity.defKey}}];\n\nCREATE TABLE [dbo].[{{=it.entity.defKey}}](\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? ' IDENTITY(1,1)' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}EXEC sp_addextendedproperty 'MS_Description', '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}', 'SCHEMA', dbo, 'table', {{=it.entity.defKey}}, null, null;{{?}}\n{{~it.entity.fields:field:index}}\nEXEC sp_addextendedproperty 'MS_Description', '{{=it.func.join(field.defName,field.comment,';')}}', 'SCHEMA', dbo, 'table', {{=it.entity.defKey}}, 'column', {{=field.defKey}};\n{{~}}\n",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
        "deleteTable": "IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[{{=it.entity.defKey}}]') AND type in (N'U')) DROP TABLE [dbo].[{{=it.entity.defKey}}];",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "deleteIndex": "",
        "message": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChanged(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n        }\n        if(before.defName !== after.defName){\n            ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n        }\n        if(before.comment !== after.comment){\n            ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n        }\n        if(ret.length>0){\n            return '    基本信息:\\n\\t'+ret.join('\\n\\t');\n        }\n        return '';\n    };\n    \n    function buildAddedDesc(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        \n        for (let field of fieldAdded) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildRemovedDesc(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        \n        for (let field of fieldRemoved) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildModifiedDesc(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        for (let field1 of fieldModified) { \n            let row = [];\n            let field = field1.before;\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n    {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n    修改字段：\n    {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n        /*计算是否调整了属性*/\n        let propAdded = entity.data.propAdded || [];\n        let propRemoved = entity.data.propRemoved || [];\n        let propModified = entity.data.propModified || [];\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n        /*计算关联是否调整*/\n        let refEntityAdd = entity.data.refEntityAdd || [];\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\n        let relaArray = [];\n        for (let rela of refEntityAdd) {\n            relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        for (let rela of refEntityRemoved) {\n            relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        /*索引是否修改过*/\n        let indexChanged = entity.data.indexChanged;\n    }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n    添加字段：\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n    删除字段：\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}",
        "update": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChangedDDL(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push(`EXEC sp_rename '${before.defKey}','${after.defKey}'`);\n        }\n        let commentText = '';\n        let commentChanged = false;\n        if(before.defName !== after.defName){\n            commentText = after.defName;\n            commentChanged = true;\n        }\n        if(before.comment !== after.comment){\n            commentChanged = true;\n            if(commentText){\n                commentText = (commentText+ ';'+after.comment)\n            }else{\n                commentText = after.comment\n            }\n        }\n        if(commentChanged){\n            let myText = `IF ((SELECT COUNT(*) FROM ::fn_listextendedproperty('MS_Description','SCHEMA', 'dbo','TABLE', '${after.defKey}', NULL, NULL)) > 0)\n            \\n\\tEXEC sp_updateextendedproperty 'MS_Description', '${commentText}','SCHEMA', 'dbo','TABLE', '${after.defKey}'\n            \\nELSE\n            \\n\\tEXEC sp_addextendedproperty 'MS_Description', '${commentText}', 'SCHEMA', 'dbo','TABLE', '${after.defKey}'\n            `;\n            ret.push(myText);\n            /*ret.push('ALTER TABLE '+after.defKey+' COMMENT \\''+commentText+'\\'');*/\n        }\n        let baseText = '-- 基本信息:\\n';\n        return baseText+ret.join(';\\n')+';';\n    };\n    \n    function buildAddedDDL(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        if(fieldAdded.length == 0){\n            return '';\n        }\n        \n        let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n        for (let field of fieldAdded) { \n            let ddlItem = `ADD [${field.defKey}] ${field.dbType}`;\n            /*处理数据类型长度*/\n            if(field.len>0){\n                ddlItem += ('('+field.len);\n                if(parseInt(field.scale)>0){\n                    ddlItem += (','+field.scale);\n                }\n                ddlItem += ')';\n            }\n            let defaultValue = field.defaultValue;\n            defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n            if(defaultValue.length>0){\n                ddlItem += (' DEFAULT ' + defaultValue);\n            }\n            if(field.notNull){\n                ddlItem += ' NOT NULL';\n            }\n            ret.push(`${firstDDL} ${ddlItem}`);\n            \n            /*处理字段注释*/\n            let fieldComments = [];\n            if(field.defName != null &&field.defName.length>0){\n                fieldComments.push(field.defName);\n            }\n            if(field.comment != null &&field.comment.length>0){\n                fieldComments.push(field.comment);\n            }\n            let commentText = fieldComments.join(';');\n            if(commentText != null && commentText.length > 0){\n                let commentDDL = `EXEC sp_addextendedproperty 'MS_Description', N'${commentText}','SCHEMA', N'dbo','TABLE', N'${entity.data.baseInfo.defKey}','COLUMN', N'${field.defKey}'`;\n                ret.push(commentDDL);\n            }\n        }\n        return '\\n'+ret.join(';\\n');\n    };\n    \n    function buildRemovedDDL(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        if(fieldRemoved.length == 0){\n            return '';\n        }\n        \n        let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n        for (let field of fieldRemoved) { \n            ret.push(`${firstDDL} DROP COLUMN [${field.defKey}]`);\n        }\n        return '\\n'+ret.join(';\\n');\n    };\n    \n    function buildModifiedDDL(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n        for (let field of fieldModified) { \n            let changeDDL = '';\n            let before = field.before || {};\n            let after = field.after || {};\n            if(before.defKey === after.defKey){\n                changeDDL += (' ALTER COLUMN ['+after.defKey+']');\n            }else{\n                let renameText = `EXEC sp_rename '[dbo].[${entity.data.baseInfo.defKey}].[${before.defKey}]','${after.defKey}','COLUMN';`;\n                ret.push(renameText);\n                continue;\n            }\n            changeDDL += (' '+after.dbType);\n            if(after.len>0){\n                changeDDL += ('('+after.len);\n                if(parseInt(after.scale)>0){\n                    changeDDL += (','+after.scale);\n                }\n                changeDDL += ')';\n            }\n            let defaultValue = after.defaultValue;\n            defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n            if(defaultValue.length>0){\n                changeDDL += (' DEFAULT ' + defaultValue);\n            }\n            \n            if(after.notNull){\n                changeDDL += ' NOT NULL';\n            }\n            ret.push(`${firstDDL} ${changeDDL};`);\n        }\n        return ret;\n    };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段：\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段：\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段：\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
      },
      {
        "applyFor": "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022",
        "type": "dbDDL",
        "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{? field.autoIncrement}}SERIAL{{??}}{{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
        "deleteTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "deleteIndex": "{{~ it.entity.indexes:index}}\nDROP INDEX {{=index.defKey}} ;\n{{~}}",
        "message": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChanged(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n        }\n        if(before.defName !== after.defName){\n            ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n        }\n        if(before.comment !== after.comment){\n            ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n        }\n        if(ret.length>0){\n            return '    基本信息:\\n\\t'+ret.join('\\n\\t');\n        }\n        return '';\n    };\n    \n    function buildAddedDesc(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        \n        for (let field of fieldAdded) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildRemovedDesc(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        \n        for (let field of fieldRemoved) { \n            let row = [];\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n    \n    function buildModifiedDesc(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        for (let field1 of fieldModified) { \n            let row = [];\n            let field = field1.before;\n            row.push(field.defKey+'['+field.defName+']');\n            ret.push(row.join(\"\"))\n        }\n        return ret;\n    };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n    {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n    修改字段：\n    {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n        /*计算是否调整了属性*/\n        let propAdded = entity.data.propAdded || [];\n        let propRemoved = entity.data.propRemoved || [];\n        let propModified = entity.data.propModified || [];\n        let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n        /*计算关联是否调整*/\n        let refEntityAdd = entity.data.refEntityAdd || [];\n        let refEntityRemoved = entity.data.refEntityRemoved || [];\n        let relaArray = [];\n        for (let rela of refEntityAdd) {\n            relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        for (let rela of refEntityRemoved) {\n            relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n        }\n        /*索引是否修改过*/\n        let indexChanged = entity.data.indexChanged;\n    }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n    添加字段：\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n    删除字段：\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}",
        "update": "{{\n    let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n    let dropEntities   = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n    let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n    \n    function baseChangedDDL(beforeAfter){\n        if(beforeAfter == null){\n            return '';\n        }\n        let ret = [];\n        let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n        if(before.defKey !== after.defKey){\n            ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\n        }\n        let commentText = '';\n        let commentChanged = false;\n        if(before.defName !== after.defName){\n            commentText = after.defName;\n            commentChanged = true;\n        }\n        if(before.comment !== after.comment){\n            commentChanged = true;\n            if(commentText){\n                commentText = (commentText+ ';'+after.comment)\n            }else{\n                commentText = after.comment\n            }\n        }\n        if(commentChanged){\n            let myText = `COMMENT ON TABLE ${after.defKey} IS '${commentText}'`;\n            ret.push(myText);\n        }\n        let baseText = '-- 基本信息:\\n';\n        return baseText+ret.join(';\\n')+';';\n    };\n    \n    function buildAddedDDL(entity){\n        let ret = [];\n        let fieldAdded = entity.data.fieldAdded||[];\n        if(fieldAdded.length == 0){\n            return '';\n        }\n        \n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n        for (let field of fieldAdded) { \n            let ddlItem = `ADD COLUMN ${field.defKey} ${field.dbType}`;\n            /*处理数据类型长度*/\n            if(field.len>0){\n                ddlItem += ('('+field.len);\n                if(parseInt(field.scale)>0){\n                    ddlItem += (','+field.scale);\n                }\n                ddlItem += ')';\n            }\n            if(field.notNull){\n                ddlItem += ' NOT NULL';\n            }            \n            let defaultValue = field.defaultValue;\n            defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n            if(defaultValue.length>0){\n                ddlItem += (' DEFAULT ' + defaultValue);\n            }\n\n            ret.push(`${firstDDL} ${ddlItem}`);\n            \n            /*处理字段注释*/\n            let fieldComments = [];\n            if(field.defName != null &&field.defName.length>0){\n                fieldComments.push(field.defName);\n            }\n            if(field.comment != null &&field.comment.length>0){\n                fieldComments.push(field.comment);\n            }\n            let commentText = fieldComments.join(';');\n            if(commentText != null && commentText.length > 0){\n                let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS '${commentText}'`;\n                 ret.push(commentDDL);\n            }\n        }\n        return '\\n'+ret.join(';\\n');\n    };\n    \n    function buildRemovedDDL(entity){\n        let ret = [];\n        let fieldRemoved = entity.data.fieldRemoved||[];\n        if(fieldRemoved.length == 0){\n            return '';\n        }\n        \n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n        for (let field of fieldRemoved) { \n            ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\n        }\n        return '\\n'+ret.join(';\\n');\n    };\n    \n    function buildModifiedDDL(entity){\n        let ret = [];\n        let fieldModified = entity.data.fieldModified||[];\n        \n        let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n        for (let field of fieldModified) { \n            let before = field.before || {};\n            let after = field.after || {};\n            if(before.defKey !== after.defKey){\n                let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\n                ret.push(renameText);\n            }\n            /*如果没有变化，则不生成变更语句*/\n            if(before.dbType === after.dbType \n            && before['len'] === after['len'] \n            && before.scale === after.scale\n            && before.primaryKey === after.primaryKey\n            && before.notNull === after.notNull\n            && before.autoIncrement === after.autoIncrement\n            && before.defaultValue === after.defaultValue){\n                continue;\n            }\n            if(before.dbType !== after.dbType || before.len !== after.len || before.scale !== after.scale){\n                let dbTypeDDL = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${after.defKey} TYPE ${before.dbType}`;\n                if(after.len>0){\n                    dbTypeDDL += ('('+after.len);\n                    if(parseInt(after.scale)>0){\n                        dbTypeDDL += (','+after.scale);\n                    }\n                    dbTypeDDL += ')';\n                }\n                ret.push(dbTypeDDL+';');\n            }\n            \n            if(before.defaultValue !== after.defaultValue){\n                let defaultDDL = '';\n                let defaultValue = after.defaultValue;\n                defaultValue = (defaultValue==null)?\"NULL\":(\"\"+defaultValue);\n                if(defaultValue.length>0){\n                    defaultDDL += ('SET DEFAULT ' + defaultValue);\n                }\n                let defaultTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${defaultDDL};`;\n                ret.push(defaultTpl);\n            }\n            \n            if(before.notNull !== after.notNull){\n                let notNullDDL= 'SET NULL';\n                if(after.notNull){\n                    let notNullDDL= 'SET NOT NULL';\n                }\n                let notNullTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${notNullDDL};`;\n                ret.push(notNullTpl);\n            }\n        }\n        return ret;\n    };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表：{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段：\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n-- 索引重建\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段：\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段：\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
      },
      {
        "type": "dbDDL",
        "applyFor": "89504F5D-94BF-4C9E-8B2E-44F37305FED5",
        "createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
      },
      {
        "type": "dbDDL",
        "applyFor": "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307",
        "createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ','('+field.defaultValue+')',' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
      },
      {
        "type": "dbDDL",
        "applyFor": "592C7013-143D-4E7B-AF64-0D7BF1E28230",
        "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
      },
      {
        "type": "dbDDL",
        "applyFor": "77BD85E5-9D0D-4096-8427-CBA306FC9C6A",
        "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
      },
      {
        "applyFor": "11D1FB71-A587-4217-89BA-611B8A1F83E0",
        "type": "dbDDL",
        "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }} COMMENT '{{=it.func.join(field.defName,field.comment,';')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n)  COMMENT '{{=it.func.join(it.entity.defName,it.entity.comment,';') }}';\n$blankline\n",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
        "deleteTable": "",
        "createIndex": "",
        "deleteIndex": "",
        "message": "",
        "update": ""
      },
      {
        "applyFor": "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1",
        "type": "dbDDL",
        "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n    {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n    {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTOINCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }} --{{=it.func.join(field.defName,field.comment,';')}}\n{{~}}\n{{? pkList.length >0 }}\n    PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n)  ; --{{=it.func.join(it.entity.defName,it.entity.comment,';') }}\n$blankline\n",
        "createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
        "createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n    {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
      },
      {
        "type": "dbDDL",
        "applyFor": "dictSQLTemplate",
        "content": "/* 插入字典总表[{{=it.dict.defKey}}-{{=it.dict.defName}}] */\nINSERT INTO SYS_DICT(KEY_,LABEL,INTRO,REVISION) VALUES('{{=it.dict.defKey}}','{{=it.dict.defName}}','{{=it.dict.intro}}',1);\n/* 插入字典明细表 */\n{{~it.dict.items:item:index}}\nINSERT INTO SYS_DICT_ITEM(DICT_KEY,KEY_,LABEL,SORT_,INTRO,REVISION) VALUES('{{=it.dict.defKey}}','{{=item.defKey}}','{{=item.defName}}','{{=item.sort}}','{{=item.intro}}',1);\n{{~}}"
      },
      {
        "applyFor": "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2",
        "type": "dbDDL",
        "createTable": "/**字段名,关键字等全部用的小写*/\ndrop table if exists {{=it.entity.defKey}};\n/**补充上库名,external关键字根据建表规范看是否添加*/\ncreate [external] table if not exists {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n/**这里把varchar,char,text,date,datetime字段全部映射为string类型.tinyint unsigned,bit,Integer,tinyint,smallint,mediumint映射为int类型,int unsigned映射为bigint.其它自定义映射规则根据自己情况修改*/\n/**当长度>0只有为decimal类型或double类型时才保留长度和小数的位数*/\n{{~it.entity.fields:field:index}}\n    {{=it.func.lowerCase(field.defKey)}} {{=it.func.lowerCase(field.dbType)=='varchar'||it.func.lowerCase(field.dbType)=='char'||it.func.lowerCase(field.dbType)=='text'||it.func.lowerCase(field.dbType)=='date'||it.func.lowerCase(field.dbType)=='datetime' ? 'string':it.func.lowerCase(field.dbType)=='tinyint unsigned'||it.func.lowerCase(field.dbType)=='bit'||it.func.lowerCase(field.dbType)=='integer'||it.func.lowerCase(field.dbType)=='tinyint'||it.func.lowerCase(field.dbType)=='smallint'||it.func.lowerCase(field.dbType)=='mediumint' ? 'int':it.func.lowerCase(field.dbType)=='int unsigned' ? 'bigint':it.func.lowerCase(field.dbType)}}{{?field.len>0&&(it.func.lowerCase(field.dbType)=='decimal'||it.func.lowerCase(field.dbType)=='double')}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{=')'}}{{?}}{{?}} comment '{{=it.func.join(field.defName,field.comment,'')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n{{?}}\n)\n{{\n    let partitionedBy = it.entity.properties['partitioned by'];\n    partitionedBy = partitionedBy?partitionedBy:'请在扩展属性中配置[partitioned by]属性';\n}}\ncomment '{{=it.func.join(it.entity.defName,';') }}'\n/**是否分区表,分区字段名和字段注释自定义*/\n[partitioned by {{=partitionedBy}}]\n/**文件存储格式自定义*/\n[stored as orc]\n/**hdfs上的地址自定义*/\n[location xxx]\n;",
        "createView": "",
        "deleteTable": "",
        "createIndex": "",
        "deleteIndex": "",
        "message": "",
        "update": ""
      },
      {
        "applyFor": "B91D99E0-9B7C-416C-8737-B760957DAF09",
        "type": "appCode",
        "content": "{{\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.entity.defName,it.entity.comment,'，')}}\n// author : http://www.liyang.love\n// date : {{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n// desc : {{=it.func.join(it.entity.defName,it.entity.comment,'，')}}\npackage models\n\n$blankline\n\n// {{=it.func.camel(it.entity.defKey,true) }}  {{=it.func.join(it.entity.defName,it.entity.comment,'，')}}。\n// 说明:{{=it.entity.comment}}\n// 表名:{{=it.entity.defKey}}\n// group: {{=it.func.camel(it.entity.defKey,true) }}\n// obsolete:\n// appliesto:go 1.8+;\n// namespace:hongmouer.his.models.{{=it.func.camel(it.entity.defKey,true) }}\n// assembly: hongmouer.his.models.go\n// class:HongMouer.HIS.Models.{{=it.func.camel(it.entity.defKey,true) }}\n// version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\ntype {{=it.func.camel(it.entity.defKey,true) }} struct {\n    {{~it.entity.fields:field:index}}\n    {{=formatGoLang(it.func.camel(field.defKey,true),null,field,it.entity.fields,null,1)}} {{=formatGoLang(field.type,\"type\",field,it.entity.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.entity.fields,null,2)}}  //type:{{=formatGoLang(field.type,\"type\",field,it.entity.fields,null,3)}}  comment:{{=formatGoLang(it.func.join(field.defName,field.comment,';'),\"defName\",field,it.entity.fields,null,4)}}  version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n    {{~}}\n}\n\n\n$blankline\n// TableName 表名:{{=it.entity.defKey}}，{{=it.entity.defName}}。\n// 说明:{{=it.entity.comment}}\nfunc (ZentaoUserInfo) TableName() string {\n\treturn \"{{=it.entity.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}}"
      },
      {
        "applyFor": "BDF457FD-9F98-4AC3-A705-7587B00A3BAB",
        "type": "appCode",
        "struct": "use chrono::{DateTime, Local};\nuse serde::{Deserialize, Serialize};\n$blankline\n/// {{=it.entity.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.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    \n}}\npub struct {{=beanClass}} {\n    {{~it.entity.fields:field:index}}\n    {{\n        let fieldDateType = field.type;\n        if(!field.notNull){\n            fieldDateType = 'Option<'+fieldDateType+'>';\n        }\n    }}/// {{=field.defName}}\n    pub {{=it.func.camel(field.defKey,false)}}: {{=fieldDateType}},\n    {{~}}\n}\n"
      }
    ],
    "generatorDoc": {
      "docTemplate": ""
    },
    "relationFieldSize": "15",
    "uiHint": [
      {
        "defKey": "Input",
        "defName": "普通输入框",
        "id": "642D2E0A-8846-4549-BE56-8C0473F26EDE"
      },
      {
        "defKey": "Select",
        "defName": "下拉输入框",
        "id": "FB111359-2B73-4443-926C-08A98E446448"
      },
      {
        "defKey": "CheckBox",
        "defName": "复选框",
        "id": "0CB8A6C9-1115-4FC0-B51E-5C028065082F"
      },
      {
        "defKey": "RadioBox",
        "defName": "单选框",
        "id": "5C04987A-260F-4B7C-A5D5-22A181AAE9CA"
      },
      {
        "defKey": "Double",
        "defName": "小数输入",
        "id": "8D5BAFE4-E15C-4707-A047-8EE59C58E70F"
      },
      {
        "defKey": "Integer",
        "defName": "整数输入",
        "id": "9999AF2A-A44E-415C-A2DC-D7C613BD0073"
      },
      {
        "defKey": "Money",
        "defName": "金额输入",
        "id": "2B0C3D0C-7BAF-4B36-81AD-9362B5E5DC2E"
      },
      {
        "defKey": "Date",
        "defName": "日期输入",
        "id": "E4D94E14-F695-487F-AFC2-4D888009B7DA"
      },
      {
        "defKey": "DataYearMonth",
        "defName": "年月输入",
        "id": "936927E3-DD2D-4096-87FD-074CDE278D59"
      },
      {
        "defKey": "Text",
        "defName": "长文本输入",
        "id": "D89DD4F1-ADAC-4469-BF8D-B3FF41AE7963"
      },
      {
        "defKey": "RichText",
        "defName": "富文本输入",
        "id": "C134EB1F-4CFF-49E0-882F-2C6FB275CB20"
      }
    ],
    "headers": [
      {
        "refKey": "defKey",
        "hideInGraph": false
      },
      {
        "refKey": "defName",
        "hideInGraph": false
      },
      {
        "refKey": "primaryKey",
        "hideInGraph": false
      },
      {
        "refKey": "notNull",
        "hideInGraph": true
      },
      {
        "refKey": "autoIncrement",
        "hideInGraph": true
      },
      {
        "refKey": "domain",
        "hideInGraph": true
      },
      {
        "refKey": "type",
        "hideInGraph": false
      },
      {
        "refKey": "len",
        "hideInGraph": false
      },
      {
        "refKey": "scale",
        "hideInGraph": false
      },
      {
        "refKey": "comment",
        "hideInGraph": true
      },
      {
        "refKey": "refDict",
        "hideInGraph": true
      },
      {
        "refKey": "defaultValue",
        "hideInGraph": true
      },
      {
        "refKey": "isStandard",
        "hideInGraph": false
      },
      {
        "refKey": "uiHint",
        "hideInGraph": true
      },
      {
        "refKey": "extProps",
        "hideInGraph": true
      }
    ],
    "recentColors": [
      "#0d0d0d",
      "#6698cc",
      "#fa5a5a",
      "#c00000",
      "#f6941d",
      "#ffc000"
    ],
    "menuWidth": "324px"
  },
  "entities": [
    {
      "id": "2BC8676A-64EF-47FB-BC3F-B48B6CC69BF2",
      "defKey": "sys_menu",
      "defName": "菜单表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "46D6DB75-9F4E-4F24-9DA5-29BE52997500",
          "extProps": {}
        },
        {
          "defKey": "pater_id",
          "defName": "父id",
          "comment": "多个,分隔",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "F217C3B7-4628-4FAE-98A6-A92B2CA6624E"
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "606F84C2-B93A-4A95-ACE4-CCBDC24F3397",
          "extProps": {}
        },
        {
          "defKey": "code",
          "defName": "标识",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "E7D88EA3-C1C9-483C-A7BE-732E8F221A10",
          "extProps": {}
        },
        {
          "defKey": "name",
          "defName": "名称",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "0971215B-6B85-449E-9893-7898176C4D53",
          "extProps": {}
        },
        {
          "defKey": "type",
          "defName": "类型",
          "comment": "1=导航列 2=数据页 3=数据接口",
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "4A391E1F-80CD-4B30-967C-20E89E5EA4EB",
          "extProps": {}
        },
        {
          "defKey": "interface_uri",
          "defName": "数据接口uri",
          "comment": "",
          "domain": "D86C424F-9D5A-494C-A2C5-2632B79412CB",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "4FF44877-80F3-421E-B000-41F12C79B53E",
          "extProps": {}
        },
        {
          "defKey": "web_json",
          "defName": "前端参数",
          "comment": "",
          "domain": "D86C424F-9D5A-494C-A2C5-2632B79412CB",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "21EE7B13-6A91-44DA-9219-E9E40B6A0EDB",
          "extProps": {}
        },
        {
          "defKey": "status",
          "defName": "状态",
          "comment": "",
          "domain": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "b'1'",
          "hideInGraph": false,
          "refDict": "",
          "id": "7CB65DB7-2139-42D5-A0FA-C71F8BF56BF7",
          "extProps": {}
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "B7101A6B-6DDD-4D0F-8C8E-360E11C0113C",
          "extProps": {}
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "C7212A38-4478-4B09-B295-29267B4A3285",
          "extProps": {}
        },
        {
          "defKey": "create_user",
          "defName": "创建人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "83EFCFF2-ABB4-4938-974C-47E0BAA79D60",
          "extProps": {}
        },
        {
          "defKey": "update_user",
          "defName": "更新人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "C629D964-DEB4-4061-AEC5-5301B60F0FE9",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "B628D609-B40C-439C-8CFC-CAF68F4D836E",
              "fieldDefKey": "46D6DB75-9F4E-4F24-9DA5-29BE52997500"
            }
          ],
          "id": "931953B0-6094-4155-A3CC-C1D38B6184A4"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": [
        {
          "myField": "out2",
          "refEntity": "3C153AA6-DB9E-453E-B18D-53F42ACF77E1",
          "refField": "in2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        }
      ]
    },
    {
      "id": "3B9AA0F5-8329-4E38-BFC0-5742EACDF0BC",
      "defKey": "sys_role",
      "defName": "角色表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "DB32D70D-9A8C-4418-BDE1-00DFEFE745DF",
          "extProps": {}
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "1AA03177-76AE-45CE-8326-910E75D9BE70",
          "extProps": {}
        },
        {
          "defKey": "code",
          "defName": "标识",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "F55E5D47-F506-4AB6-8668-00CC025D4E19",
          "extProps": {}
        },
        {
          "defKey": "name",
          "defName": "名称",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "80AE6AD5-599A-49F1-8A67-31DDD12C72AF",
          "extProps": {}
        },
        {
          "defKey": "status",
          "defName": "状态",
          "comment": "",
          "domain": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "b'1'",
          "hideInGraph": false,
          "refDict": "",
          "id": "9BED0032-D305-4B5B-AD58-5DB6501E5AC3",
          "extProps": {}
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "8E3BC174-4884-4FDA-B90C-A499FD45764A",
          "extProps": {}
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "8D1ADF2C-54AD-48DE-9A64-15AA923FE61F",
          "extProps": {}
        },
        {
          "defKey": "create_user",
          "defName": "创建人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "F0A2B145-3E4F-4C33-B608-FDD98335265A",
          "extProps": {}
        },
        {
          "defKey": "update_user",
          "defName": "更新人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "AC7E3950-449A-4188-A732-1FDDCFD590B9",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "E8CE87F5-868A-4B45-80DF-4C96BFF08ED6",
              "fieldDefKey": "DB32D70D-9A8C-4418-BDE1-00DFEFE745DF"
            }
          ],
          "id": "C35D858E-4E61-496D-8408-495CC7648A01"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": [
        {
          "myField": "in2",
          "refEntity": "3C153AA6-DB9E-453E-B18D-53F42ACF77E1",
          "refField": "out2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        },
        {
          "myField": "bottom2",
          "refEntity": "9E62C632-65EE-4ACE-9775-A6C5B32257EE",
          "refField": "top2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        },
        {
          "myField": "in3",
          "refEntity": "5ACC7A86-5995-4B6A-A0CA-1570374586DA",
          "refField": "top2",
          "myRows": "n",
          "refRows": "1",
          "innerType": ""
        }
      ]
    },
    {
      "id": "3C153AA6-DB9E-453E-B18D-53F42ACF77E1",
      "defKey": "sys_role_menu",
      "defName": "角色菜单表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "7FC6E11D-AD8E-4291-AB29-C3A65023674F",
          "extProps": {}
        },
        {
          "defKey": "role_id",
          "defName": "角色id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "99E5A2C3-EF84-4BB0-B32F-ACAD25A8EBF6",
          "extProps": {}
        },
        {
          "defKey": "menu_id",
          "defName": "菜单id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "4311115E-04A3-4AEA-A304-290CCA8D958A",
          "extProps": {}
        },
        {
          "defKey": "select_is_admin",
          "defName": "管理员数据查询权限",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "b'0'",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B",
          "id": "00D21F4A-CC67-4693-AE77-A07041D3BBED"
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "A8B8863F-651F-4751-9777-F93D12E04716"
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "EDF99B47-A362-43B5-863A-6CDD634C4A42",
              "fieldDefKey": "7FC6E11D-AD8E-4291-AB29-C3A65023674F"
            }
          ],
          "id": "3117E8B6-24CC-49F5-BB47-69F915179C47"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": []
    },
    {
      "id": "9E62C632-65EE-4ACE-9775-A6C5B32257EE",
      "defKey": "sys_user_role",
      "defName": "业务用户角色表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "A7B087EF-40CB-4A9A-99C2-D5131B91922F",
          "extProps": {}
        },
        {
          "defKey": "work_user_id",
          "defName": "业务用户id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "9B26B465-3C07-4DB5-BEC6-CFE1C0391575",
          "extProps": {}
        },
        {
          "defKey": "role_id",
          "defName": "角色id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "28830D34-5193-4B95-B53C-C995FB152A6F",
          "extProps": {}
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "4430A200-6938-40A8-B6DF-8FA3882F69D1",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "EC299397-7A7A-4F38-A46B-4CFB6C0BB20D",
              "fieldDefKey": "A7B087EF-40CB-4A9A-99C2-D5131B91922F"
            }
          ],
          "id": "A0D1E64D-9D6E-4E22-AAAB-C1C19F28236A"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": []
    },
    {
      "id": "D27B982B-89FF-4B2A-A154-1BE39144C98B",
      "defKey": "sys_system",
      "defName": "系统表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "81802E10-8D4E-455D-9DA7-D7B8FDCD6B1E",
          "extProps": {}
        },
        {
          "defKey": "code",
          "defName": "标识",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "142FA480-D8AE-4B07-92B6-96C21B8C077B",
          "extProps": {}
        },
        {
          "defKey": "name",
          "defName": "名称",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "06BF5497-5555-44E9-9004-4FC4FF4079C3",
          "extProps": {}
        },
        {
          "defKey": "status",
          "defName": "状态",
          "comment": "",
          "domain": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "b'1'",
          "hideInGraph": false,
          "refDict": "",
          "id": "EC8EEBA6-5257-4239-A01B-DB986D51849B",
          "extProps": {}
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "5B7562B4-2B8A-4353-AF75-79615DE7764D",
          "extProps": {}
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "B07A6454-C113-438E-BC03-29750090E286",
          "extProps": {}
        },
        {
          "defKey": "create_user",
          "defName": "创建人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "E8D37244-2AB2-4214-9537-0AAF957A98DE",
          "extProps": {}
        },
        {
          "defKey": "update_user",
          "defName": "更新人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "D1C4F878-5635-4CC4-B11E-C5BB7362B5DC",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "FEAF32C8-6711-4483-B20A-1C5E6166E0DD",
              "fieldDefKey": "81802E10-8D4E-455D-9DA7-D7B8FDCD6B1E"
            }
          ],
          "id": "0D2F4201-44CC-4640-A98B-1FB43A0B4082"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": [
        {
          "myField": "in2",
          "refEntity": "2BC8676A-64EF-47FB-BC3F-B48B6CC69BF2",
          "refField": "top3",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        },
        {
          "myField": "top2",
          "refEntity": "0EF2F3B7-2775-4841-A819-55F50E017902",
          "refField": "bottom2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        },
        {
          "myField": "out3",
          "refEntity": "3B9AA0F5-8329-4E38-BFC0-5742EACDF0BC",
          "refField": "top2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        }
      ]
    },
    {
      "id": "0EF2F3B7-2775-4841-A819-55F50E017902",
      "defKey": "sys_system_value",
      "defName": "系统属性表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "450E03E6-1D1A-487F-B1DB-A7EEAC0E9E40",
          "extProps": {}
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "F05A9059-1051-4FBC-801B-A5600B9FB504",
          "extProps": {}
        },
        {
          "defKey": "code",
          "defName": "属性编码",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "48CC9CEC-2E49-4B51-82A4-AF54989DA5BD",
          "extProps": {}
        },
        {
          "defKey": "value",
          "defName": "属性值",
          "comment": "",
          "domain": "D86C424F-9D5A-494C-A2C5-2632B79412CB",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "6BFE2FB2-A9C2-4EC5-96AB-55C640117865",
          "extProps": {}
        },
        {
          "defKey": "status",
          "defName": "状态",
          "comment": "",
          "domain": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "b'1'",
          "hideInGraph": false,
          "refDict": "",
          "id": "950F6201-81C6-4231-AC9B-262230536056",
          "extProps": {}
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "4F962DE5-F6D7-4FD3-BBEF-936BFB1A82FA",
          "extProps": {}
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "D3142AA1-CFC2-48AF-BD3A-9253A77908AF",
          "extProps": {}
        },
        {
          "defKey": "create_user",
          "defName": "创建人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "25C1C446-087F-46A8-AEE3-D3C41A23FE31",
          "extProps": {}
        },
        {
          "defKey": "update_user",
          "defName": "更新人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "070E1E58-21FD-44E3-BC8F-702F1478E3B4",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "E73FDB65-40B1-4719-BD24-596F2E58A85F",
              "fieldDefKey": "450E03E6-1D1A-487F-B1DB-A7EEAC0E9E40"
            }
          ],
          "id": "153A5C4B-9F35-403F-B5D5-3B97403BD7AF"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": []
    },
    {
      "id": "2CE82749-25AC-4D5A-A049-BBA2825CFC37",
      "defKey": "sys_work_user",
      "defName": "业务用户信息表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "B32FF176-8EB1-452C-808A-941F90061F6D",
          "extProps": {}
        },
        {
          "defKey": "account",
          "defName": "账号",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "99A62876-E12D-4908-91E5-7554B8720884",
          "extProps": {}
        },
        {
          "defKey": "email",
          "defName": "邮箱",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "id": "1511CD76-06DB-412A-8FB4-5CDF083B2BA7"
        },
        {
          "defKey": "phone",
          "defName": "手机",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "id": "2FB8B462-924B-42FB-9ADE-89D809FC42BC"
        },
        {
          "defKey": "password",
          "defName": "密码",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "B432F062-F636-4D15-BD40-620D247B5341",
          "extProps": {}
        },
        {
          "defKey": "last_login_id",
          "defName": "最后登录的账号",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "id": "83F241C6-1F4D-4094-90C2-7358737B1CB6"
        },
        {
          "defKey": "last_login_time",
          "defName": "最后登录时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "1E8A0A87-1579-4A57-819F-311BEA06FD1E",
          "extProps": {}
        },
        {
          "defKey": "login_num",
          "defName": "登录次数",
          "comment": "",
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "0",
          "hideInGraph": false,
          "refDict": "",
          "id": "E4CBFBF8-180A-4599-A84F-BD6B94428D19",
          "extProps": {}
        },
        {
          "defKey": "status",
          "defName": "状态",
          "comment": "",
          "domain": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "b'1'",
          "hideInGraph": false,
          "refDict": "",
          "id": "8A9E98C7-081B-454E-9ADF-C416E5EA8EA1",
          "extProps": {}
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "DA2B2E64-42C7-4418-B4AB-743D784A5109",
          "extProps": {}
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "84BC377C-E160-4AF6-938C-C19840E0FD09",
          "extProps": {}
        },
        {
          "defKey": "create_user",
          "defName": "创建人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "C93B4AC4-0D1D-4029-9DFC-5F87E1246A8E",
          "extProps": {}
        },
        {
          "defKey": "update_user",
          "defName": "更新人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "0FD81A91-9A24-4EB4-9A96-BC0558211ADE",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "0D30E0A0-C9AD-4D2A-9D95-4BAD5D349591",
              "fieldDefKey": "B32FF176-8EB1-452C-808A-941F90061F6D"
            }
          ],
          "id": "E412FC3C-4884-4960-A31C-DE7A38BB1160"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": [
        {
          "myField": "bottom2",
          "refEntity": "9EED2A6B-FAF5-47C9-BFDC-71B28296E2BE",
          "refField": "top2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        },
        {
          "myField": "in2",
          "refEntity": "7B016F26-3122-4454-87DD-4DCA157B9DF7",
          "refField": "out2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        },
        {
          "myField": "top2",
          "refEntity": "9E62C632-65EE-4ACE-9775-A6C5B32257EE",
          "refField": "bottom2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        }
      ]
    },
    {
      "id": "DE9705E6-4555-4B6F-A3AE-2F14ECA20FC6",
      "defKey": "sys_dict",
      "defName": "字典表",
      "comment": "",
      "properties": {},
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "92BF7192-EA33-445F-929B-E49E1A132918",
          "extProps": {}
        },
        {
          "defKey": "pater_code",
          "defName": "父编码",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "DF658243-BD39-46A7-9EE7-E7D126F48F2D",
          "extProps": {}
        },
        {
          "defKey": "code",
          "defName": "编码",
          "comment": "",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "37B10E06-35E9-4426-8994-6D3BBB4F1C2E",
          "extProps": {}
        },
        {
          "defKey": "value",
          "defName": "编码值",
          "comment": "",
          "domain": "D86C424F-9D5A-494C-A2C5-2632B79412CB",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "5F79ECD0-975F-45DE-8AC2-38476DB46EAE",
          "extProps": {}
        },
        {
          "defKey": "msg",
          "defName": "编码说明",
          "comment": "",
          "domain": "D86C424F-9D5A-494C-A2C5-2632B79412CB",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "EF9A87C3-C9AF-4B4B-8A89-F9AAE832545F",
          "extProps": {}
        },
        {
          "defKey": "status",
          "defName": "状态",
          "comment": "1=启用 2=禁用",
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "1",
          "hideInGraph": false,
          "refDict": "",
          "id": "2F52FE95-4C08-4B8F-89AB-6F0151368626",
          "extProps": {}
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "54F2E42B-A07C-4D5C-AFB9-3311A9D289F0",
          "extProps": {}
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "2895327A-B920-4CFA-A317-6F0A387E1E4F",
          "extProps": {}
        },
        {
          "defKey": "create_user",
          "defName": "创建人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "E68AE69F-699C-42CC-A681-06B9B94A8BC9",
          "extProps": {}
        },
        {
          "defKey": "update_user",
          "defName": "更新人",
          "comment": "",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "89B6E084-71A1-4688-BADA-6F4025A13524",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "A082CFB3-4264-4581-803A-4F16C298CECC",
              "fieldDefKey": "92BF7192-EA33-445F-929B-E49E1A132918"
            }
          ],
          "id": "707FB4E7-BFC3-44CD-8E18-1303DC05452F"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": []
    },
    {
      "id": "7C53BC3E-8552-4232-8D17-1F6A6B21A40E",
      "defKey": "mqtt_command",
      "defName": "指令记录（es）",
      "comment": "指令记录（es）",
      "properties": {},
      "fields": [
        {
          "defKey": "ID",
          "defName": "ID",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "94510EE9-B365-4621-AC7F-882B56F0D812",
          "extProps": {}
        },
        {
          "defKey": "debug",
          "defName": "是否调试",
          "comment": "",
          "domain": "",
          "type": "boolean",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "AF04F05C-9EF2-420F-A174-7B7D4B3B62B9",
          "extProps": {}
        },
        {
          "defKey": "type",
          "defName": "指令类型",
          "comment": "check=自检指令 lockDevice=锁机指令 lock=门锁指令 temperature=温度指令 lamp=灯光指令 camera=摄像头指令\ncell=电池指令 log=日志指令",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "13426CC6-7E3E-4079-9E32-A7103D6C745D",
          "extProps": {}
        },
        {
          "defKey": "status",
          "defName": "指令状态",
          "comment": "1=已发送 2=发送失败 3=已执行 4=执行失败，5=执行超时 6=已完成",
          "domain": "",
          "type": "int",
          "len": 10,
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "3542CDC1-F0AD-4738-AE9C-FCCC00CB5154",
          "extProps": {}
        },
        {
          "defKey": "value",
          "defName": "指令完整值",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "3E1EA714-BEDD-471A-A4C7-4436CBE3970F",
          "extProps": {}
        },
        {
          "defKey": "send_time",
          "defName": "指令发送时间",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "465A47D3-0909-4011-8265-E0A1B8E10478",
          "extProps": {}
        },
        {
          "defKey": "exec_time",
          "defName": "指令执行时间",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "BD3B76A6-9C12-4AA5-B1D1-118C032D89FE",
          "extProps": {}
        },
        {
          "defKey": "timeout",
          "defName": "指令过期时间",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "1EE4C677-1BAB-4063-8B3F-1F948AC7F1FF",
          "extProps": {}
        },
        {
          "defKey": "topic",
          "defName": "接收指令的topic",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "31E5EE23-471F-4C75-9047-ECFA4D55D503",
          "extProps": {}
        },
        {
          "defKey": "ack",
          "defName": "是否需应答",
          "comment": "",
          "domain": "",
          "type": "boolean",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "60ADFCBA-0883-4C91-940B-28460FE258C1",
          "extProps": {}
        },
        {
          "defKey": "level",
          "defName": "消息级别",
          "comment": "0=qs0 1=qs1 2=qs2",
          "domain": "",
          "type": "int",
          "len": 10,
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "279D96D6-CA24-4234-A06F-F4AABEA81FE7",
          "extProps": {}
        },
        {
          "defKey": "num",
          "defName": "已发送次数",
          "comment": "",
          "domain": "",
          "type": "int",
          "len": 10,
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "1364C516-D096-4F78-B486-C31F8AA8565A",
          "extProps": {}
        },
        {
          "defKey": "delay_time",
          "defName": "消息消费时间（延迟消费）",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "id": "ADEFCA1F-6C52-432D-B382-82646FEA2730",
          "extProps": {}
        },
        {
          "defKey": "error",
          "defName": "错误日志",
          "comment": "",
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "type": "varchar",
          "len": "",
          "scale": "",
          "primaryKey": null,
          "notNull": null,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "id": "4C402A05-A3E9-45EE-9D26-1D6CE0A3E45F",
          "extProps": {}
        }
      ],
      "indexes": [
        {
          "defKey": "Key_1",
          "unique": false,
          "defName": "Key_1",
          "comment": "",
          "fields": [
            {
              "ascOrDesc": null,
              "id": "BEA5FB20-C1EA-456E-8BEF-3BB327051CF7",
              "fieldDefKey": "94510EE9-B365-4621-AC7F-882B56F0D812"
            }
          ],
          "id": "15C4917E-2221-478F-8146-9A85F623C95A"
        }
      ],
      "nameTemplate": "{defKey}[{defName}]",
      "headers": [
        {
          "freeze": false,
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "freeze": true,
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "freeze": true,
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "freeze": false,
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "freeze": false,
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "correlations": []
    },
    {
      "id": "9EED2A6B-FAF5-47C9-BFDC-71B28296E2BE",
      "defKey": "sys_work_user_third",
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "A182336F-32D9-43A6-A3A4-8FABDBE92C6D"
        },
        {
          "defKey": "work_user_id",
          "defName": "业务用户id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "148CC2E4-25AB-499F-9648-B5EE2BE321BC"
        },
        {
          "defKey": "third_id",
          "defName": "第三方标识",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "D86C424F-9D5A-494C-A2C5-2632B79412CB",
          "id": "667DE870-7219-4BB1-A34A-8A0B2BD2DAA7"
        },
        {
          "defKey": "type",
          "defName": "类型",
          "comment": "1=微信 2=其他",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "id": "D2CF3DDF-B3B3-4757-891F-B1E94C6736BE"
        },
        {
          "defKey": "pic",
          "defName": "头像",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "D86C424F-9D5A-494C-A2C5-2632B79412CB",
          "id": "8C593A9A-C655-4CB4-9968-FA8008DA59FB"
        },
        {
          "defKey": "name",
          "defName": "名称",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A",
          "id": "024119EE-0C76-4C84-A42A-1DD79EEEA1BF"
        },
        {
          "defKey": "sys_id",
          "defName": "系统ID",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "B41DE078-0B32-4447-A895-D185616401A1"
        }
      ],
      "properties": {},
      "defName": "业务用户第三方账号表",
      "indexes": [],
      "correlations": []
    },
    {
      "id": "CE8CDF20-2AF6-4B62-B33B-F541AE64017C",
      "defKey": "sys_dept",
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "5E6D42C7-E18B-40A7-9A0A-B66A6463B69E",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        },
        {
          "defKey": "parent_id",
          "defName": "父id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "523BD1C6-7551-47D6-82FE-384AEE5C4CB4"
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "5527A00B-BE62-42F0-BD37-B29205BF19C4",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        },
        {
          "defKey": "name",
          "defName": "名称",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "3B26E9F4-B360-4E67-877B-ACEB30385066",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A"
        },
        {
          "defKey": "code",
          "defName": "标识",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "2F92A313-A9B3-4990-A587-DA1BA1D97621",
          "domain": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A"
        },
        {
          "defKey": "sort_num",
          "defName": "排序号",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "id": "E1ED66C2-5A9C-4DCC-9AFC-9F1F41AE3782"
        },
        {
          "defKey": "status",
          "defName": "状态",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "b'1'",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "C99155DC-1C67-41AB-B926-7D07CF45ACF4",
          "domain": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B"
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "2EBE540B-C166-4C67-B055-1673960300C2"
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "type": "datetime",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "B97D051E-90F2-4F94-87A6-A6F666F95BD0"
        },
        {
          "defKey": "create_user",
          "defName": "创建人",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "C1332B58-1B47-43B5-996E-0CE0E1901506",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        },
        {
          "defKey": "update_user",
          "defName": "更新人",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "0E55C358-6595-45C5-BA18-95D340B69110",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        }
      ],
      "properties": {},
      "defName": "部门表",
      "indexes": [],
      "correlations": [
        {
          "myField": "bottom2",
          "refEntity": "7B016F26-3122-4454-87DD-4DCA157B9DF7",
          "refField": "top2",
          "myRows": "arrow",
          "refRows": "1",
          "innerType": ""
        }
      ]
    },
    {
      "id": "7B016F26-3122-4454-87DD-4DCA157B9DF7",
      "defKey": "sys_user_dept",
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "6489020B-F083-4291-8FD1-D9A058DAD451",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        },
        {
          "defKey": "work_user_id",
          "defName": "业务用户id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "05355BA6-03AC-4D27-A1A7-EBF1BCB5AA30",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        },
        {
          "defKey": "dept_id",
          "defName": "部门id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "266E8EDD-7E7B-45E5-8B2E-4A9A37EF3315"
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "660700A9-3A0A-4880-8CA5-63A4C416E064",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        }
      ],
      "properties": {},
      "defName": "业务用户部门表",
      "indexes": [],
      "correlations": []
    },
    {
      "id": "0B0BE2E6-B67D-4AD3-81BD-A338401D1745",
      "env": {
        "base": {
          "nameSpace": "",
          "codeRoot": ""
        }
      },
      "defKey": "sys_dept_relation",
      "defName": "部门关系表",
      "comment": "",
      "properties": {
        "partitioned by": "(date string)",
        "row format delimited": "",
        "fields terminated by ','": "",
        "collection items terminated by '-'": "",
        "map keys terminated by ':'": "",
        "store as textfile;": ""
      },
      "nameTemplate": "{defKey}[{defName}]",
      "notes": {},
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "ancestor",
          "defName": "祖级ID",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "4F419336-6772-413E-8F4D-B38320260B66"
        },
        {
          "defKey": "descendant",
          "defName": "后代ID",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "2C1CB4ED-8A0B-4AF9-884C-D41F7ADE5524"
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "C72CDDFA-E2AC-47F5-A4E8-BCCD9C9AF969"
        }
      ],
      "correlations": [
        {
          "myField": "out2",
          "refEntity": "CE8CDF20-2AF6-4B62-B33B-F541AE64017C",
          "refField": "in",
          "myRows": "n",
          "refRows": "1",
          "innerType": ""
        }
      ],
      "indexes": []
    },
    {
      "id": "5ACC7A86-5995-4B6A-A0CA-1570374586DA",
      "defKey": "sys_dept_role",
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "hideInGraph": false
        },
        {
          "refKey": "primaryKey",
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "hideInGraph": true
        },
        {
          "refKey": "refDict",
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "dept_id",
          "defName": "部门id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "id": "266E8EDD-7E7B-45E5-8B2E-4A9A37EF3315"
        },
        {
          "defKey": "role_id",
          "defName": "角色id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "660700A9-3A0A-4880-8CA5-63A4C416E064",
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
        },
        {
          "defKey": "sys_id",
          "defName": "系统id",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "id": "C0B833A1-6674-4548-8278-8572E185D2F0"
        }
      ],
      "properties": {},
      "defName": "部门角色表",
      "indexes": [],
      "correlations": [
        {
          "myField": "bottom2",
          "refEntity": "CE8CDF20-2AF6-4B62-B33B-F541AE64017C",
          "refField": "out",
          "myRows": "n",
          "refRows": "1",
          "innerType": ""
        }
      ]
    }
  ],
  "views": [],
  "dicts": [
    {
      "defKey": "Gender",
      "defName": "性别",
      "intro": "",
      "items": [
        {
          "defKey": "M",
          "defName": "男",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "1",
          "id": "3622D417-DA1A-408F-BEE1-11D328D534A0"
        },
        {
          "defKey": "F",
          "defName": "女",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "2",
          "id": "380A0790-64A7-481E-831C-32F7BEE1502B"
        },
        {
          "defKey": "U",
          "defName": "未知",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "3",
          "id": "FA239F4D-1276-40D9-B230-F66BD35C3C27"
        }
      ],
      "id": "BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D"
    },
    {
      "defKey": "Political",
      "defName": "政治面貌",
      "intro": "",
      "items": [
        {
          "defKey": "10",
          "defName": "共青团员",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "61F3145A-7599-4CCB-B298-D5EE788107BE"
        },
        {
          "defKey": "20",
          "defName": "中共党员",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "ED16D25A-AB2F-4FA0-BB48-2B9031FA28C4"
        },
        {
          "defKey": "30",
          "defName": "民主党派",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "0FB7974A-AE11-438F-86E0-B163316F9272"
        },
        {
          "defKey": "40",
          "defName": "群众",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "7D247234-7E97-45B1-8C56-4A17A370854A"
        },
        {
          "defKey": "90",
          "defName": "未知",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "DA65D752-AF04-4A11-81D8-14A38692A64A"
        }
      ],
      "id": "06EED564-BBA9-4747-8D73-AF809A330CB8"
    },
    {
      "defKey": "Marital",
      "defName": "婚姻状况",
      "intro": "婚姻状况的码表",
      "items": [
        {
          "defKey": "UNMARRIED",
          "defName": "未婚",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "1",
          "id": "20EE81BC-74EE-47DA-A56F-9663B23F44BD"
        },
        {
          "defKey": "MARRIED",
          "defName": "已婚",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "2",
          "id": "4DCA10A8-417E-4A8D-BDF6-0A278C060ADC"
        },
        {
          "defKey": "WIDOWED",
          "defName": "丧偶",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "3",
          "id": "826062A7-057C-4892-B338-06459F5B808D"
        },
        {
          "defKey": "DIVORCE",
          "defName": "离婚",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "4",
          "id": "B23200B4-5E59-4F5E-A779-D981A040FA32"
        },
        {
          "defKey": "UNSPECIFIED",
          "defName": "未说明",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "5",
          "id": "A7928FE2-349A-4702-9682-2EF7205E077B"
        }
      ],
      "id": "EA1587B7-3954-437A-BFE0-FCB0453BCABA"
    },
    {
      "defKey": "StudentStatus",
      "defName": "学生状态",
      "intro": "",
      "items": [
        {
          "defKey": "Normal",
          "defName": "正常",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "1",
          "id": "E9CA1CC9-8851-4F6B-86BA-B9CF0E44EB73"
        },
        {
          "defKey": "Graduated",
          "defName": "毕业",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "2",
          "id": "DEC51D7C-99DF-430C-817D-0499862D3CCC"
        },
        {
          "defKey": "Studied",
          "defName": "肄业",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "3",
          "id": "8853D6B6-75D3-4479-9006-FC731CD85B20"
        },
        {
          "defKey": "Stop",
          "defName": "休学",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "sort": "4",
          "id": "C74BA8CF-1DC6-4C79-BAAC-F11EB9C6AF01"
        }
      ],
      "id": "4642BC5F-02EE-4E17-A60C-CF22F86A0282"
    },
    {
      "defKey": "GBNation",
      "defName": "民族",
      "intro": "",
      "items": [
        {
          "defKey": "01",
          "defName": "汉族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "9224DF53-F7C0-447D-B8ED-0A39F799EE19"
        },
        {
          "defKey": "02",
          "defName": "蒙古族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "D57818E3-9206-45BB-AE79-27C64A4AB80F"
        },
        {
          "defKey": "03",
          "defName": "回族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "0A1A3CA9-6D68-4E15-8BD0-9A2FF428D804"
        },
        {
          "defKey": "04",
          "defName": "藏族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "7CC6B6BE-47EA-460E-ACFA-C377468DEA11"
        },
        {
          "defKey": "05",
          "defName": "维吾尔族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "A666D51F-D249-4FAC-B1F3-78C371836CB3"
        },
        {
          "defKey": "06",
          "defName": "苗族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "A0C9E1BA-D87B-4695-ADFA-287FDA32BB5A"
        },
        {
          "defKey": "07",
          "defName": "彝族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "149B5B9E-C1D1-4790-8CCF-0ED5F4B25172"
        },
        {
          "defKey": "08",
          "defName": "壮族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "F9A3E65C-BF4D-4C6B-ADB7-8C9CF0487360"
        },
        {
          "defKey": "09",
          "defName": "布依族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "14F17DE4-E96A-460B-98A6-F84EC8CF9885"
        },
        {
          "defKey": "10",
          "defName": "朝鲜族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "8A81AB18-B1BF-4797-A6E5-DEDB2C6566B0"
        },
        {
          "defKey": "11",
          "defName": "满族",
          "intro": "",
          "parentKey": "",
          "enabled": true,
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "id": "7D460947-FBD2-4E4D-8366-3B38DCAF09D1"
        }
      ],
      "id": "115EDEFC-0323-410E-81AB-CCAB8879837A"
    },
    {
      "defKey": "GradeLevel",
      "defName": "受教育程度",
      "sort": "",
      "intro": "",
      "items": [],
      "id": "9E7C9788-B805-4C7D-8531-FD1D9DC79B05"
    }
  ],
  "viewGroups": [
    {
      "defKey": "权限",
      "defName": "权限",
      "refEntities": [
        "2BC8676A-64EF-47FB-BC3F-B48B6CC69BF2",
        "3B9AA0F5-8329-4E38-BFC0-5742EACDF0BC",
        "3C153AA6-DB9E-453E-B18D-53F42ACF77E1",
        "9E62C632-65EE-4ACE-9775-A6C5B32257EE",
        "D27B982B-89FF-4B2A-A154-1BE39144C98B",
        "0EF2F3B7-2775-4841-A819-55F50E017902",
        "2CE82749-25AC-4D5A-A049-BBA2825CFC37",
        "9EED2A6B-FAF5-47C9-BFDC-71B28296E2BE",
        "CE8CDF20-2AF6-4B62-B33B-F541AE64017C",
        "7B016F26-3122-4454-87DD-4DCA157B9DF7",
        "0B0BE2E6-B67D-4AD3-81BD-A338401D1745",
        "5ACC7A86-5995-4B6A-A0CA-1570374586DA"
      ],
      "refViews": [],
      "refDiagrams": [
        "D8665CAE-6EA0-4EA1-BE19-C71AA1552E5D"
      ],
      "refDicts": [],
      "id": "7F622D0C-00AC-4B27-A016-8480DE07115F",
      "undefined": []
    },
    {
      "defKey": "系统",
      "defName": "",
      "refEntities": [
        "DE9705E6-4555-4B6F-A3AE-2F14ECA20FC6"
      ],
      "refViews": [],
      "refDiagrams": [
        "351CF48D-1125-448D-A570-819202381851"
      ],
      "refDicts": [],
      "id": "2738CAD3-A3BD-4CF1-8001-CB3677BC96AD",
      "undefined": []
    },
    {
      "defKey": "指令",
      "defName": "指令",
      "refEntities": [
        "7C53BC3E-8552-4232-8D17-1F6A6B21A40E"
      ],
      "refViews": [],
      "refDiagrams": [],
      "refDicts": [],
      "id": "E34C26AF-EB8C-4709-A93F-185922160106",
      "undefined": []
    }
  ],
  "dataTypeMapping": {
    "referURL": "",
    "mappings": [
      {
        "defKey": "string",
        "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
        "defName": "字符串",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR",
        "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2",
        "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR",
        "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR",
        "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR",
        "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2",
        "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR",
        "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR",
        "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING",
        "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT",
        "797A1496-D649-4261-89B4-544132EC3F36": "String",
        "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String",
        "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String",
        "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string",
        "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string",
        "B91D99E0-9B7C-416C-8737-B760957DAF09": "string",
        "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String"
      },
      {
        "defKey": "int",
        "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811",
        "defName": "整数",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT",
        "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT",
        "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "INT",
        "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "INTEGER",
        "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "INT",
        "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "INTEGER",
        "592C7013-143D-4E7B-AF64-0D7BF1E28230": "INTEGER",
        "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "INT4",
        "11D1FB71-A587-4217-89BA-611B8A1F83E0": "INT",
        "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "INTEGER",
        "797A1496-D649-4261-89B4-544132EC3F36": "Integer",
        "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Integer",
        "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Integer",
        "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "float",
        "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "int",
        "B91D99E0-9B7C-416C-8737-B760957DAF09": "*int",
        "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "i32"
      },
      {
        "defKey": "bigint",
        "defName": "大整数",
        "id": "B66C00B8-4A0D-452D-B3C0-27EC86BD2AA5",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "bigint",
        "797A1496-D649-4261-89B4-544132EC3F36": "Long"
      },
      {
        "defKey": "double",
        "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E",
        "defName": "小数",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL",
        "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL",
        "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL",
        "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC",
        "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL",
        "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL",
        "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC",
        "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC",
        "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE",
        "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL",
        "797A1496-D649-4261-89B4-544132EC3F36": "Double",
        "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double",
        "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double",
        "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal",
        "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double",
        "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64",
        "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64"
      },
      {
        "defKey": "bigDecimal",
        "defName": "科学计数",
        "id": "17E7BFB1-8C5D-4EE6-AD4E-6F7EB86723AB",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL",
        "797A1496-D649-4261-89B4-544132EC3F36": "BigDecimal"
      },
      {
        "defKey": "date",
        "id": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
        "defName": "日期",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DATETIME",
        "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DATE",
        "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DATETIME",
        "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "TIMESTAMP",
        "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DATE",
        "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DATE",
        "592C7013-143D-4E7B-AF64-0D7BF1E28230": "DATE",
        "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "DATE",
        "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DATETIME",
        "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "NUMERIC",
        "797A1496-D649-4261-89B4-544132EC3F36": "LocalDateTime",
        "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Date",
        "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Date",
        "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "DateTime",
        "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "timestamp",
        "B91D99E0-9B7C-416C-8737-B760957DAF09": "*time.Time",
        "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "DateTime<Local>"
      },
      {
        "defKey": "bytes",
        "id": "D516E75B-90F5-4741-B9B3-A186A263F04C",
        "defName": "二进制",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "BLOB",
        "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "BLOB",
        "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARBINARY",
        "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "BYTEA",
        "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "BLOB",
        "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "BLOB",
        "592C7013-143D-4E7B-AF64-0D7BF1E28230": "BYTEA",
        "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "BYTEA",
        "11D1FB71-A587-4217-89BA-611B8A1F83E0": "BINARY",
        "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "NONE",
        "797A1496-D649-4261-89B4-544132EC3F36": "byte[]",
        "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "byte[]",
        "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "byte[]",
        "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "binary",
        "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "binary",
        "B91D99E0-9B7C-416C-8737-B760957DAF09": "[]byte"
      },
      {
        "defKey": "largeText",
        "id": "B17BDED3-085F-40E1-9019-3B79CF2BF075",
        "defName": "大文本",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "TEXT",
        "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "CLOB",
        "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "TEXT",
        "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "TEXT",
        "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "CLOB",
        "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "CLOB",
        "592C7013-143D-4E7B-AF64-0D7BF1E28230": "TEXT",
        "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "TEXT",
        "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING",
        "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT",
        "797A1496-D649-4261-89B4-544132EC3F36": "String",
        "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String",
        "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String",
        "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string",
        "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string",
        "B91D99E0-9B7C-416C-8737-B760957DAF09": "string",
        "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String"
      },
      {
        "defKey": "bit",
        "defName": "布尔值",
        "id": "DF4EB47F-9175-4D64-87E8-CECA60662457",
        "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "bit",
        "797A1496-D649-4261-89B4-544132EC3F36": "Boolean"
      }
    ]
  },
  "domains": [
    {
      "defKey": "Int",
      "defName": "整数",
      "applyFor": "1D764C4A-6F9F-421E-B11A-6F3E23B51811",
      "len": "",
      "scale": "",
      "uiHint": "",
      "id": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E"
    },
    {
      "defKey": "Bigint",
      "defName": "大整数",
      "applyFor": "B66C00B8-4A0D-452D-B3C0-27EC86BD2AA5",
      "len": "",
      "scale": "",
      "uiHint": "",
      "id": "6B4AB9A0-7D19-434F-AB16-31FA6C402F41"
    },
    {
      "defKey": "Double",
      "defName": "小数",
      "applyFor": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E",
      "len": 24,
      "scale": 6,
      "uiHint": "",
      "id": "FF4459C5-6B45-4DBF-8FC0-E06239BC05B4"
    },
    {
      "defKey": "DateTime",
      "defName": "日期时间",
      "applyFor": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
      "len": "",
      "scale": "",
      "uiHint": "",
      "id": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC"
    },
    {
      "defKey": "Varchar32",
      "defName": "字符串(32)",
      "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
      "len": 32,
      "scale": "",
      "uiHint": "",
      "id": "4F7AB269-E959-4E64-B304-32E0AE0F01AF"
    },
    {
      "defKey": "Varchar64",
      "defName": "字符串(64)",
      "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
      "len": 64,
      "scale": "",
      "uiHint": "",
      "id": "E4FC6BE2-5676-4F3B-A9CE-05C988BC922A"
    },
    {
      "defKey": "Varchar256",
      "defName": "字符串(256)",
      "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
      "len": 256,
      "scale": "",
      "uiHint": "",
      "id": "D86C424F-9D5A-494C-A2C5-2632B79412CB"
    },
    {
      "defKey": "BigDecimal10,2",
      "defName": "科学计数(10, 2)",
      "applyFor": "17E7BFB1-8C5D-4EE6-AD4E-6F7EB86723AB",
      "len": 10,
      "scale": 2,
      "uiHint": "",
      "id": "27EE6285-5F36-44FE-B11E-821E2C5A85EC"
    },
    {
      "defKey": "BigDecimal10,4",
      "defName": "科学计数(10, 4)",
      "applyFor": "17E7BFB1-8C5D-4EE6-AD4E-6F7EB86723AB",
      "len": 10,
      "scale": 4,
      "uiHint": "",
      "id": "A5C140EF-CA96-4FA7-9295-10944F00162E"
    },
    {
      "defKey": "Boolean",
      "defName": "布尔值",
      "applyFor": "DF4EB47F-9175-4D64-87E8-CECA60662457",
      "len": 1,
      "scale": "",
      "uiHint": "",
      "id": "50660CAA-2BBB-4E29-9559-719AEBF2BA9B"
    }
  ],
  "diagrams": [
    {
      "defKey": "权限关系图",
      "defName": "权限关系图",
      "relationType": "entity",
      "canvasData": {
        "cells": [
          {
            "id": "5d95a74d-5ab9-4b0f-a41b-eacac59f8795",
            "shape": "table",
            "position": {
              "x": 834.5,
              "y": 1194
            },
            "count": 0,
            "originKey": "9EED2A6B-FAF5-47C9-BFDC-71B28296E2BE",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "721de780-eadc-4c27-b342-6fa78dfaa46c",
            "shape": "erdRelation",
            "source": {
              "cell": "7a4e648d-d200-45ef-b2c6-5057a67c8e93",
              "port": "in2"
            },
            "target": {
              "cell": "6770d708-f8d9-4586-be24-932b6a1798ff",
              "port": "out2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "e957b44e-f630-4ddd-a74e-d45c7fd7b463",
            "shape": "erdRelation",
            "source": {
              "cell": "7a4e648d-d200-45ef-b2c6-5057a67c8e93",
              "port": "out2"
            },
            "target": {
              "cell": "d232ddd2-c48f-4cfb-b6ed-01cc69360460",
              "port": "in2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "0e029215-2036-4e14-bf13-e679c98563a4",
            "shape": "erdRelation",
            "source": {
              "cell": "6770d708-f8d9-4586-be24-932b6a1798ff",
              "port": "top3"
            },
            "target": {
              "cell": "1993679c-08f3-41ce-b9c1-df834d4653b6",
              "port": "in2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "5866342f-6f48-4a7c-91bc-6b181f670c7f",
            "shape": "erdRelation",
            "source": {
              "cell": "8647f1a7-4004-4eb0-8bcf-db683a62077d",
              "port": "bottom2"
            },
            "target": {
              "cell": "1993679c-08f3-41ce-b9c1-df834d4653b6",
              "port": "top2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "4a24037a-4365-4419-8e63-540f73aa96ab",
            "shape": "erdRelation",
            "source": {
              "cell": "5d95a74d-5ab9-4b0f-a41b-eacac59f8795",
              "port": "top2"
            },
            "target": {
              "cell": "5dc8d8eb-2a6c-4514-8748-6d7e37d85d69",
              "port": "bottom2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "6338f2ce-9273-4969-8087-92e0671b5cd1",
            "shape": "erdRelation",
            "source": {
              "cell": "d8d9343e-5b19-4bdc-bcae-7c9cd76236be",
              "port": "out2"
            },
            "target": {
              "cell": "5dc8d8eb-2a6c-4514-8748-6d7e37d85d69",
              "port": "in2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "fa465969-ff51-4b36-a6de-3740d95268f9",
            "shape": "erdRelation",
            "source": {
              "cell": "57180568-9c4b-48eb-81e5-85ead229bd59",
              "port": "bottom2"
            },
            "target": {
              "cell": "5dc8d8eb-2a6c-4514-8748-6d7e37d85d69",
              "port": "top2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "a3caa037-e6be-4830-9c20-6ab6fac78f12",
            "shape": "erdRelation",
            "source": {
              "cell": "57180568-9c4b-48eb-81e5-85ead229bd59",
              "port": "top2"
            },
            "target": {
              "cell": "d232ddd2-c48f-4cfb-b6ed-01cc69360460",
              "port": "bottom2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "5d32eb82-8284-460c-a76d-9fc4d2241f51",
            "shape": "erdRelation",
            "source": {
              "cell": "d8d9343e-5b19-4bdc-bcae-7c9cd76236be",
              "port": "top2"
            },
            "target": {
              "cell": "447bcd49-b109-4450-a24e-208d8d784629",
              "port": "bottom2"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "b9fc052c-a44b-44b3-8da5-5a95b9b78d1a",
            "shape": "erdRelation",
            "source": {
              "cell": "d232ddd2-c48f-4cfb-b6ed-01cc69360460",
              "port": "top2"
            },
            "target": {
              "cell": "1993679c-08f3-41ce-b9c1-df834d4653b6",
              "port": "out3"
            },
            "relation": "1:arrow",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "5465c7c4-78c8-4dd9-b1cf-54ce471af937",
            "shape": "erdRelation",
            "source": {
              "cell": "447bcd49-b109-4450-a24e-208d8d784629",
              "port": "in"
            },
            "target": {
              "cell": "649054c9-795c-4ee0-9e78-dcd1a5c3e895",
              "port": "out2"
            },
            "relation": "1:n",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "359ca6d5-d943-4076-bff4-5cc99656ed28",
            "shape": "erdRelation",
            "source": {
              "cell": "447bcd49-b109-4450-a24e-208d8d784629",
              "port": "out"
            },
            "target": {
              "cell": "e17ab639-eb4f-4642-9164-7ba0e884dac4",
              "port": "bottom2"
            },
            "relation": "1:n",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "e199af09-0a08-421e-9023-692fd2a5819f",
            "shape": "erdRelation",
            "source": {
              "cell": "e17ab639-eb4f-4642-9164-7ba0e884dac4",
              "port": "top2"
            },
            "target": {
              "cell": "d232ddd2-c48f-4cfb-b6ed-01cc69360460",
              "port": "in3"
            },
            "relation": "1:n",
            "fillColor": "#ACDAFC"
          },
          {
            "id": "8647f1a7-4004-4eb0-8bcf-db683a62077d",
            "shape": "table",
            "position": {
              "x": 437,
              "y": -684
            },
            "count": 0,
            "originKey": "0EF2F3B7-2775-4841-A819-55F50E017902",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "1993679c-08f3-41ce-b9c1-df834d4653b6",
            "shape": "table",
            "position": {
              "x": 440.5,
              "y": -314
            },
            "count": 0,
            "originKey": "D27B982B-89FF-4B2A-A154-1BE39144C98B",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "57180568-9c4b-48eb-81e5-85ead229bd59",
            "shape": "table",
            "position": {
              "x": 852,
              "y": 477
            },
            "count": 0,
            "originKey": "9E62C632-65EE-4ACE-9775-A6C5B32257EE",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "649054c9-795c-4ee0-9e78-dcd1a5c3e895",
            "shape": "table",
            "position": {
              "x": -210,
              "y": 523
            },
            "count": 0,
            "originKey": "0B0BE2E6-B67D-4AD3-81BD-A338401D1745",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "6770d708-f8d9-4586-be24-932b6a1798ff",
            "shape": "table",
            "position": {
              "x": -70,
              "y": 58.5
            },
            "count": 0,
            "originKey": "2BC8676A-64EF-47FB-BC3F-B48B6CC69BF2",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "447bcd49-b109-4450-a24e-208d8d784629",
            "shape": "table",
            "position": {
              "x": 168,
              "y": 523
            },
            "count": 0,
            "originKey": "CE8CDF20-2AF6-4B62-B33B-F541AE64017C",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "d8d9343e-5b19-4bdc-bcae-7c9cd76236be",
            "shape": "table",
            "position": {
              "x": 176,
              "y": 920
            },
            "count": 0,
            "originKey": "7B016F26-3122-4454-87DD-4DCA157B9DF7",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "5dc8d8eb-2a6c-4514-8748-6d7e37d85d69",
            "shape": "table",
            "position": {
              "x": 819,
              "y": 713
            },
            "count": 0,
            "originKey": "2CE82749-25AC-4D5A-A049-BBA2825CFC37",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "e17ab639-eb4f-4642-9164-7ba0e884dac4",
            "shape": "table",
            "position": {
              "x": 476,
              "y": 364
            },
            "count": 0,
            "originKey": "5ACC7A86-5995-4B6A-A0CA-1570374586DA",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "d232ddd2-c48f-4cfb-b6ed-01cc69360460",
            "shape": "table",
            "position": {
              "x": 842,
              "y": 104.5
            },
            "count": 0,
            "originKey": "3B9AA0F5-8329-4E38-BFC0-5742EACDF0BC",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          },
          {
            "id": "7a4e648d-d200-45ef-b2c6-5057a67c8e93",
            "shape": "table",
            "position": {
              "x": 382.5,
              "y": 150.5
            },
            "count": 0,
            "originKey": "3C153AA6-DB9E-453E-B18D-53F42ACF77E1",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          }
        ]
      },
      "id": "D8665CAE-6EA0-4EA1-BE19-C71AA1552E5D"
    },
    {
      "defKey": "系统关系图",
      "defName": "系统关系图",
      "relationType": "entity",
      "canvasData": {
        "cells": [
          {
            "id": "81c91ce3-ca12-4fdd-b804-ba2919066fc5",
            "shape": "table",
            "position": {
              "x": 280,
              "y": 110
            },
            "count": 0,
            "originKey": "DE9705E6-4555-4B6F-A3AE-2F14ECA20FC6",
            "ports": {
              "groups": {
                "in": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "zIndex": 3,
                  "position": {
                    "name": "left"
                  }
                },
                "out": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "right"
                  }
                },
                "top": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "top"
                  }
                },
                "bottom": {
                  "attrs": {
                    "circle": {
                      "r": 4,
                      "magnet": true,
                      "stroke": "#1890FF",
                      "fill": "#FFF",
                      "strokeWidth": 1,
                      "style": {
                        "visibility": "hidden"
                      }
                    }
                  },
                  "position": {
                    "name": "bottom"
                  }
                }
              },
              "items": [
                {
                  "group": "in",
                  "id": "in"
                },
                {
                  "group": "in",
                  "id": "in2"
                },
                {
                  "group": "in",
                  "id": "in3"
                },
                {
                  "group": "out",
                  "id": "out"
                },
                {
                  "group": "out",
                  "id": "out2"
                },
                {
                  "group": "out",
                  "id": "out3"
                },
                {
                  "group": "top",
                  "id": "top"
                },
                {
                  "group": "top",
                  "id": "top2"
                },
                {
                  "group": "top",
                  "id": "top3"
                },
                {
                  "group": "bottom",
                  "id": "bottom"
                },
                {
                  "group": "bottom",
                  "id": "bottom2"
                },
                {
                  "group": "bottom",
                  "id": "bottom3"
                }
              ]
            }
          }
        ]
      },
      "id": "351CF48D-1125-448D-A570-819202381851"
    }
  ],
  "standardFields": [
    {
      "defKey": "personInfo",
      "defName": "个人基本信息要素",
      "fields": [
        {
          "defKey": "ID_CARD_NO",
          "defName": "身份证号",
          "comment": "",
          "type": "VARCHAR",
          "len": "60",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "refDict": "",
          "uiHint": "",
          "id": "A64A91C8-A41F-4113-92FB-7563D7EF054D"
        },
        {
          "defKey": "MOBILE_PHONE",
          "defName": "手机号",
          "comment": "",
          "type": "VARCHAR",
          "len": "60",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "refDict": "",
          "uiHint": "",
          "id": "479DA2AB-1974-411A-A81E-92FB939E75EB"
        },
        {
          "defKey": "GENDER",
          "defName": "性别",
          "comment": "",
          "type": "VARCHAR",
          "len": "32",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "refDict": "BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D",
          "uiHint": "",
          "id": "48473E29-6594-4912-AADE-C8AB44FCA3E9"
        },
        {
          "defKey": "BIRTH",
          "defName": "出生日期",
          "comment": "",
          "type": "DATETIME",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "refDict": "",
          "uiHint": "",
          "id": "2BD3D2EE-2411-49A6-983D-84B81057312F"
        },
        {
          "defKey": "AVATAR",
          "defName": "头像",
          "comment": "",
          "type": "VARCHAR",
          "len": "60",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "refDict": "",
          "uiHint": "",
          "id": "FDD67CEE-4B52-4BD1-A1A3-9C5EBC6037E6"
        },
        {
          "defKey": "HEIGHT",
          "defName": "身高",
          "comment": "",
          "type": "INT",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "refDict": "",
          "uiHint": "",
          "id": "CAAA0E79-41A1-4758-B481-D171168C4D68"
        },
        {
          "defKey": "WEIGHT",
          "defName": "体重",
          "comment": "",
          "type": "INT",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "refDict": "",
          "uiHint": "",
          "id": "575482CE-64A6-4CB9-99DC-8E126D190AAA"
        },
        {
          "defKey": "NATION",
          "defName": "名族",
          "comment": "",
          "type": "VARCHAR",
          "len": "32",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "refDict": "115EDEFC-0323-410E-81AB-CCAB8879837A",
          "uiHint": "",
          "id": "15B0D75D-0B97-4985-A816-D0EAFA90446B"
        },
        {
          "defKey": "POLITICAL",
          "defName": "政治面貌",
          "comment": "",
          "type": "VARCHAR",
          "len": "32",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "refDict": "06EED564-BBA9-4747-8D73-AF809A330CB8",
          "uiHint": "",
          "id": "F458E86D-84D6-45A1-9DD3-51E6C8170D7F"
        },
        {
          "defKey": "MARITAL",
          "defName": "婚姻状况",
          "comment": "",
          "type": "VARCHAR",
          "len": "32",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "refDict": "EA1587B7-3954-437A-BFE0-FCB0453BCABA",
          "uiHint": "",
          "id": "7275E578-6893-4922-AC69-95B261BFBD61"
        },
        {
          "defKey": "DOMICILE_PLACE_PROVINCE",
          "defName": "籍贯（省）",
          "comment": "",
          "type": "VARCHAR",
          "len": "60",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "refDict": "",
          "uiHint": "",
          "id": "F04BF130-3EC1-4E02-9DED-3214CA88E352"
        },
        {
          "defKey": "DOMICILE_PLACE_CITY",
          "defName": "籍贯（市）",
          "comment": "",
          "type": "VARCHAR",
          "len": "32",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "refDict": "",
          "uiHint": "",
          "id": "B97F5BC2-33DE-4857-9DB8-ECFD02C9040C"
        },
        {
          "defKey": "DOMICILE_PLACE_ADDRESS",
          "defName": "户籍地址",
          "comment": "",
          "type": "VARCHAR",
          "len": "60",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "refDict": "",
          "uiHint": "",
          "id": "812ADF1D-8C03-40CA-B030-E539838FB889"
        }
      ],
      "id": "F30202B9-4B5D-4CE7-87CE-B3890C84D3F2"
    }
  ],
  "dbConn": [
    {
      "defKey": "D4843C6A-F7EC-480D-A8DB-4F6655F65F92",
      "defName": "local-mysql",
      "type": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
      "properties": {
        "driver_class_name": "com.mysql.cj.jdbc.Driver",
        "url": "jdbc:mysql://127.0.0.1: 3306/are?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC",
        "password": "fmx2022",
        "username": "root"
      }
    }
  ]
}