tanghc vor 4 Jahren
Ursprung
Commit
60890ae453
26 geänderte Dateien mit 401 neuen und 56 gelöschten Zeilen
  1. 6 0
      changelog.md
  2. BIN
      db/gen.db
  3. 24 1
      db/mysql.sql
  4. 30 0
      front/src/views/generate/index.vue
  5. 3 1
      front/src/views/generate/result.vue
  6. BIN
      gen.db
  7. 1 1
      gen/pom.xml
  8. 1 0
      gen/src/main/java/com/gitee/gen/gen/CsharpColumnDefinition.java
  9. 2 0
      gen/src/main/java/com/gitee/gen/gen/TypeEnum.java
  10. 2 2
      gen/src/main/java/com/gitee/gen/gen/TypeFormatter.java
  11. 2 0
      gen/src/main/java/com/gitee/gen/gen/converter/ColumnTypeConverter.java
  12. 5 2
      gen/src/main/java/com/gitee/gen/gen/sqlserver/SqlServerColumnSelector.java
  13. 72 0
      gen/src/main/java/com/gitee/gen/gen/sqlserver/SqlServerTypeFormatter.java
  14. 27 27
      gen/src/main/resources/mybatis/DatasourceConfigMapper.xml
  15. 16 16
      gen/src/main/resources/mybatis/TemplateConfigMapper.xml
  16. 1 1
      gen/src/main/resources/public/index.html
  17. 1 1
      gen/src/main/resources/public/static/css/chunk-5fb3a2ba.a44bb87d.css
  18. 1 1
      gen/src/main/resources/public/static/js/app.9e8af06f.js
  19. 0 1
      gen/src/main/resources/public/static/js/chunk-2d0efd67.4aa2592b.js
  20. 1 0
      gen/src/main/resources/public/static/js/chunk-2d0efd67.7ff0ed4c.js
  21. 1 0
      gen/src/main/resources/public/static/js/chunk-5fb3a2ba.87c9def0.js
  22. 0 1
      gen/src/main/resources/public/static/js/chunk-5fb3a2ba.f53405a1.js
  23. 0 1
      gen/src/main/resources/public/static/js/chunk-70c97e3b.380c4612.js
  24. 1 0
      gen/src/main/resources/public/static/js/chunk-70c97e3b.3c1cab1d.js
  25. 90 0
      gen/src/main/resources/public/velocity/csharp.json
  26. 114 0
      gen/src/main/resources/public/velocity/java.json

+ 6 - 0
changelog.md

@@ -1,5 +1,11 @@
 # changelog
 
+## 1.3.0
+
+- 支持C#变量,可生成C#文件
+- 支持表过滤
+- 支持数据源复制
+
 ## 1.2.2
 
 - 优化模板编辑界面

BIN
db/gen.db


+ 24 - 1
db/mysql.sql

@@ -237,7 +237,30 @@ export default {
     }
   }
 }
-</script>',0);
+</script>',0),
+(5, 'Model-C#', '${context.className}.cs', 'using Newtonsoft.Json;
+
+namespace ${context.packageName}
+{
+#if( "${table.comment}" != "" )
+ 	/// <summary>
+    /// ${table.comment}
+    /// </summary>
+#end
+    public class ${context.className}
+    {
+#foreach($column in $csharpColumns)
+#if( "${column.comment}" != "" )
+        /// <summary>
+        /// ${column.comment}
+        /// </summary>
+#end
+        [JsonProperty("${column.field}")]
+		public ${column.fieldType} ${column.property} { get; set; }
+
+#end
+    }
+}');
 
 
 

+ 30 - 0
front/src/views/generate/index.vue

@@ -15,6 +15,9 @@
           >
             <span style="float: left">{{ `${item.dbName}(${item.host})` }} </span>
             <span style="float: right; color: #8492a6; font-size: 13px">
+              <el-tooltip placement="top" content="Duplicate">
+                <el-link type="primary" icon="el-icon-document-copy" style="margin-right: 20px;" @click.stop="onDataSourceDuplicate(item)"></el-link>
+              </el-tooltip>
               <el-link type="primary" icon="el-icon-edit" style="margin-right: 20px;" @click.stop="onDataSourceUpdate(item)"></el-link>
               <el-link type="danger" icon="el-icon-delete" @click.stop="onDataSourceDelete(item)"></el-link>
             </span>
@@ -29,11 +32,19 @@
     <el-row v-show="showTable" :gutter="20">
       <el-col :span="12">
         <h4>选择表</h4>
+        <el-input
+          v-model="tableSearch"
+          prefix-icon="el-icon-search"
+          size="mini"
+          placeholder="过滤表"
+          style="margin-bottom: 10px;width: 100%;"
+        />
         <el-table
           :data="tableListData"
           border
           :cell-style="cellStyleSmall()"
           :header-cell-style="headCellStyleSmall()"
+          :row-class-name="tableRowClassName"
           @selection-change="onTableListSelect"
         >
           <el-table-column
@@ -127,6 +138,9 @@
         margin-top: 20px;
       }
   }
+  .el-table .hidden-row {
+    display: none;
+  }
 </style>
 <script>
 export default {
@@ -139,6 +153,7 @@ export default {
         templateConfigIdList: [],
         packageName: ''
       },
+      tableSearch: '',
       datasourceConfigList: [],
       tableListData: [],
       templateListData: [],
@@ -180,6 +195,15 @@ export default {
     this.loadDbType()
   },
   methods: {
+    tableRowClassName: function ({row, index}) {
+      if (this.tableSearch.length === 0) {
+        return ''
+      }
+      if (!(row.tableName && row.tableName.indexOf(this.tableSearch) > -1)) {
+        return 'hidden-row';
+      }
+      return ''
+    },
     loadDataSource() {
       this.post('/datasource/list', {}, resp => {
         this.datasourceConfigList = resp.data
@@ -218,6 +242,12 @@ export default {
       Object.assign(this.datasourceFormData, item)
       this.datasourceDlgShow = true
     },
+    onDataSourceDuplicate(item) {
+      this.datasourceTitle = `${item.host} Copy`
+      Object.assign(this.datasourceFormData, item)
+      this.datasourceFormData.id = 0
+      this.datasourceDlgShow = true
+    },
     onDataSourceDelete(row) {
       this.confirm(`确认要删除 ${row.dbName} 吗?`, function(done) {
         const data = {

+ 3 - 1
front/src/views/generate/result.vue

@@ -64,10 +64,12 @@ require('codemirror/mode/xml/xml')
 const mode_map = {
   'js': 'text/javascript',
   'java': 'text/x-java',
+  'cs': 'text/x-csharp',
   'jsp': 'application/x-jsp',
   'html': 'text/html',
+  'vue': 'application/x-ejs',
   'aspx': 'application/x-aspx',
-  'xml': 'xml'
+  'xml': 'application/xml'
 }
 export default {
   components: { codemirror },

BIN
gen.db


+ 1 - 1
gen/pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>com.gitee.codegen</groupId>
     <artifactId>gen</artifactId>
-    <version>1.2.2</version>
+    <version>1.3.0</version>
     <description>一款代码生成器</description>
 
     <properties>

+ 1 - 0
gen/src/main/java/com/gitee/gen/gen/CsharpColumnDefinition.java

@@ -5,6 +5,7 @@ import com.gitee.gen.gen.converter.CsharpColumnTypeConverter;
 import com.gitee.gen.util.FieldUtil;
 
 /**
+ * 提供C# Velocity变量
  * @author tanghc
  */
 public class CsharpColumnDefinition extends ColumnDefinition {

+ 2 - 0
gen/src/main/java/com/gitee/gen/gen/TypeEnum.java

@@ -1,6 +1,8 @@
 package com.gitee.gen.gen;
 
 /**
+ * 统一类型枚举
+ *
  * @author tanghc
  */
 public enum TypeEnum {

+ 2 - 2
gen/src/main/java/com/gitee/gen/gen/TypeFormatter.java

@@ -5,8 +5,8 @@ import org.apache.commons.lang.StringUtils;
 import java.util.List;
 
 /**
- * 将数据库类型格式化成统一的类型
- *
+ * 将数据库类型格式化成统一的类型
+ * @see TypeEnum
  * @author tanghc
  */
 public interface TypeFormatter {

+ 2 - 0
gen/src/main/java/com/gitee/gen/gen/converter/ColumnTypeConverter.java

@@ -1,6 +1,8 @@
 package com.gitee.gen.gen.converter;
 
 /**
+ * 将数据库类型转换成各语言对应的类型
+ * @see com.gitee.gen.gen.TypeEnum
  * @author tanghc
  */
 public interface ColumnTypeConverter {

+ 5 - 2
gen/src/main/java/com/gitee/gen/gen/sqlserver/SqlServerColumnSelector.java

@@ -1,13 +1,15 @@
 package com.gitee.gen.gen.sqlserver;
 
 import com.gitee.gen.gen.ColumnDefinition;
-import com.gitee.gen.gen.GeneratorConfig;
 import com.gitee.gen.gen.ColumnSelector;
+import com.gitee.gen.gen.GeneratorConfig;
 
 import java.util.Map;
 import java.util.Set;
 
 public class SqlServerColumnSelector extends ColumnSelector {
+
+	private static final SqlServerTypeFormatter TYPE_FORMATTER = new SqlServerTypeFormatter();
 	
 	private static String TABKE_DETAIL_SQL = new StringBuilder()
 		.append("SELECT")
@@ -94,7 +96,8 @@ public class SqlServerColumnSelector extends ColumnSelector {
 		columnDefinition.setIsIdentity((Boolean)rowMap.get("IS_IDENTITY"));
 		boolean isPk = (Integer)rowMap.get("IS_PK") == 1;
 		columnDefinition.setIsPk(isPk);
-		columnDefinition.setType((String)rowMap.get("TYPE"));
+		String type = (String) rowMap.get("TYPE");
+		columnDefinition.setType(TYPE_FORMATTER.format(type));
 		
 		columnDefinition.setComment((String)rowMap.get("COMMENT"));
 		

+ 72 - 0
gen/src/main/java/com/gitee/gen/gen/sqlserver/SqlServerTypeFormatter.java

@@ -0,0 +1,72 @@
+package com.gitee.gen.gen.sqlserver;
+
+import com.gitee.gen.gen.TypeFormatter;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+/**
+ * @author tanghc
+ */
+public class SqlServerTypeFormatter implements TypeFormatter {
+
+    @Override
+    public boolean isBit(String columnType) {
+        return contains(Collections.singletonList("bit"), columnType);
+    }
+
+    @Override
+    public boolean isBoolean(String columnType) {
+        return contains(Collections.singletonList("boolean"), columnType);
+    }
+
+    @Override
+    public boolean isTinyint(String columnType) {
+        return contains(Collections.singletonList("tinyint"), columnType);
+    }
+
+    @Override
+    public boolean isSmallint(String columnType) {
+        return contains(Collections.singletonList("smallint"), columnType);
+    }
+
+    @Override
+    public boolean isInt(String columnType) {
+        return !isLong(columnType) && contains(Arrays.asList("int", "integer"), columnType);
+    }
+
+    @Override
+    public boolean isLong(String columnType) {
+        return !isVarchar(columnType) && contains(Collections.singletonList("bigint"), columnType);
+    }
+
+    @Override
+    public boolean isFloat(String columnType) {
+        return contains(Arrays.asList("float", "real"), columnType);
+    }
+
+    @Override
+    public boolean isDouble(String columnType) {
+        return contains(Collections.singletonList("double"), columnType);
+    }
+
+    @Override
+    public boolean isDecimal(String columnType) {
+        return contains(Arrays.asList("decimal", "numeric", "money", "smallmoney"), columnType);
+    }
+
+    @Override
+    public boolean isVarchar(String columnType) {
+        return contains(Arrays.asList("CHAR", "VARCHAR", "TEXT", "nchar", "nvarchar", "ntext"), columnType);
+    }
+
+    @Override
+    public boolean isDatetime(String columnType) {
+        return contains(Arrays.asList("DATE", "TIME", "DATETIME", "TIMESTAMP", "datetime2", "smalldatetime", "datetimeoffset"), columnType);
+    }
+
+    @Override
+    public boolean isBlob(String columnType) {
+        return contains(Arrays.asList("blob", "binary", "varbinary"), columnType);
+    }
+}

+ 27 - 27
gen/src/main/resources/mybatis/DatasourceConfigMapper.xml

@@ -2,15 +2,15 @@
 <!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.gitee.gen.mapper.DatasourceConfigMapper">
     <resultMap id="BaseResultMap" type="com.gitee.gen.entity.DatasourceConfig">
-        <result column="id" property="id" jdbcType="INTEGER" />
-        <result column="db_type" property="dbType" jdbcType="INTEGER" />
-        <result column="driver_class" property="driverClass" jdbcType="VARCHAR" />
-        <result column="db_name" property="dbName" jdbcType="VARCHAR" />
-        <result column="host" property="host" jdbcType="VARCHAR" />
-        <result column="port" property="port" jdbcType="INTEGER" />
-        <result column="username" property="username" jdbcType="VARCHAR" />
-        <result column="password" property="password" jdbcType="VARCHAR" />
-        <result column="is_deleted" property="isDeleted" jdbcType="INTEGER" />
+        <result column="id" property="id"/>
+        <result column="db_type" property="dbType"/>
+        <result column="driver_class" property="driverClass"/>
+        <result column="db_name" property="dbName"/>
+        <result column="host" property="host"/>
+        <result column="port" property="port"/>
+        <result column="username" property="username"/>
+        <result column="password" property="password"/>
+        <result column="is_deleted" property="isDeleted"/>
     </resultMap>
 
     <!-- 表字段 -->
@@ -29,7 +29,7 @@
     <!-- 查询全部 -->
     <select id="listAll" resultMap="BaseResultMap">
         SELECT
-        <include refid="baseColumns" />
+        <include refid="baseColumns"/>
         FROM datasource_config t
         WHERE is_deleted=0
     </select>
@@ -37,7 +37,7 @@
     <!-- 根据主键获取单条记录 -->
     <select id="getById" resultMap="BaseResultMap" parameterType="Integer">
         SELECT
-        <include refid="baseColumns" />
+        <include refid="baseColumns"/>
         FROM datasource_config t
         WHERE id = #{id}
     </select>
@@ -102,28 +102,28 @@
             </if>
         </trim>
         <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="dbType != null" >
+            <if test="dbType != null">
                 #{dbType},
             </if>
-            <if test="driverClass != null" >
+            <if test="driverClass != null">
                 #{driverClass},
             </if>
-            <if test="dbName != null" >
+            <if test="dbName != null">
                 #{dbName},
             </if>
-            <if test="host != null" >
+            <if test="host != null">
                 #{host},
             </if>
-            <if test="port != null" >
+            <if test="port != null">
                 #{port},
             </if>
-            <if test="username != null" >
+            <if test="username != null">
                 #{username},
             </if>
-            <if test="password != null" >
+            <if test="password != null">
                 #{password},
             </if>
-            <if test="isDeleted != null" >
+            <if test="isDeleted != null">
                 #{isDeleted},
             </if>
         </trim>
@@ -150,28 +150,28 @@
     <update id="updateIgnoreNull" parameterType="com.gitee.gen.entity.DatasourceConfig">
         UPDATE datasource_config
         <set>
-            <if test="dbType != null" >
+            <if test="dbType != null">
                 db_type=#{dbType},
             </if>
-            <if test="driverClass != null" >
+            <if test="driverClass != null">
                 driver_class=#{driverClass},
             </if>
-            <if test="dbName != null" >
+            <if test="dbName != null">
                 db_name=#{dbName},
             </if>
-            <if test="host != null" >
+            <if test="host != null">
                 host=#{host},
             </if>
-            <if test="port != null" >
+            <if test="port != null">
                 port=#{port},
             </if>
-            <if test="username != null" >
+            <if test="username != null">
                 username=#{username},
             </if>
-            <if test="password != null" >
+            <if test="password != null">
                 password=#{password},
             </if>
-            <if test="isDeleted != null" >
+            <if test="isDeleted != null">
                 is_deleted=#{isDeleted},
             </if>
         </set>

+ 16 - 16
gen/src/main/resources/mybatis/TemplateConfigMapper.xml

@@ -2,11 +2,11 @@
 <!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.gitee.gen.mapper.TemplateConfigMapper">
     <resultMap id="BaseResultMap" type="com.gitee.gen.entity.TemplateConfig">
-        <result column="id" property="id" jdbcType="INTEGER" />
-        <result column="name" property="name" jdbcType="VARCHAR" />
-        <result column="file_name" property="fileName" jdbcType="VARCHAR" />
-        <result column="content" property="content" jdbcType="VARCHAR" />
-        <result column="is_deleted" property="isDeleted" jdbcType="INTEGER" />
+        <result column="id" property="id"/>
+        <result column="name" property="name"/>
+        <result column="file_name" property="fileName"/>
+        <result column="content" property="content"/>
+        <result column="is_deleted" property="isDeleted"/>
     </resultMap>
 
     <!-- 表字段 -->
@@ -21,14 +21,14 @@
     <!-- 查询全部 -->
     <select id="listAll" resultMap="BaseResultMap">
         SELECT
-        <include refid="baseColumns" />
+        <include refid="baseColumns"/>
         FROM template_config t
         WHERE is_deleted=0
     </select>
 
     <select id="getByName" resultMap="BaseResultMap">
         SELECT
-        <include refid="baseColumns" />
+        <include refid="baseColumns"/>
         FROM template_config t
         WHERE name = #{name}
     </select>
@@ -36,7 +36,7 @@
     <!-- 根据主键获取单条记录 -->
     <select id="getById" resultMap="BaseResultMap" parameterType="Integer">
         SELECT
-        <include refid="baseColumns" />
+        <include refid="baseColumns"/>
         FROM template_config t
         WHERE id = #{id}
     </select>
@@ -81,16 +81,16 @@
             </if>
         </trim>
         <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="name != null" >
+            <if test="name != null">
                 #{name},
             </if>
-            <if test="fileName != null" >
+            <if test="fileName != null">
                 #{fileName},
             </if>
-            <if test="content != null" >
+            <if test="content != null">
                 #{content},
             </if>
-            <if test="isDeleted != null" >
+            <if test="isDeleted != null">
                 #{isDeleted},
             </if>
         </trim>
@@ -113,16 +113,16 @@
     <update id="updateIgnoreNull" parameterType="com.gitee.gen.entity.TemplateConfig">
         UPDATE template_config
         <set>
-            <if test="name != null" >
+            <if test="name != null">
                 name=#{name},
             </if>
-            <if test="fileName != null" >
+            <if test="fileName != null">
                 file_name=#{fileName},
             </if>
-            <if test="content != null" >
+            <if test="content != null">
                 content=#{content},
             </if>
-            <if test="isDeleted != null" >
+            <if test="isDeleted != null">
                 is_deleted=#{isDeleted},
             </if>
         </set>

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
gen/src/main/resources/public/index.html


+ 1 - 1
gen/src/main/resources/public/static/css/chunk-5fb3a2ba.a44bb87d.css

@@ -1 +1 @@
-.code-gen{margin:0 auto;width:70%}.code-gen .el-input{width:450px}.code-gen .el-row h4{text-align:center}.code-gen .el-row .el-button{margin-top:20px}
+.code-gen{margin:0 auto;width:70%}.code-gen .el-input{width:450px}.code-gen .el-row h4{text-align:center}.code-gen .el-row .el-button{margin-top:20px}.el-table .hidden-row{display:none}

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
gen/src/main/resources/public/static/js/app.9e8af06f.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
gen/src/main/resources/public/static/js/chunk-2d0efd67.4aa2592b.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
gen/src/main/resources/public/static/js/chunk-2d0efd67.7ff0ed4c.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
gen/src/main/resources/public/static/js/chunk-5fb3a2ba.87c9def0.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
gen/src/main/resources/public/static/js/chunk-5fb3a2ba.f53405a1.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
gen/src/main/resources/public/static/js/chunk-70c97e3b.380c4612.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
gen/src/main/resources/public/static/js/chunk-70c97e3b.3c1cab1d.js


+ 90 - 0
gen/src/main/resources/public/velocity/csharp.json

@@ -0,0 +1,90 @@
+{
+  "data": [
+    {
+      "expression": "${pk}",
+      "text": "主键对象,同${column}"
+    },
+    {
+      "expression": "${context}",
+      "text": "",
+      "children": [
+        {
+          "expression": "${context.dbName}",
+          "text": "数据库名"
+        },
+        {
+          "expression": "${context.className}",
+          "text": "类名"
+        },
+        {
+          "expression": "${context.packageName}",
+          "text": "namespace"
+        },
+        {
+          "expression": "${context.pkName}",
+          "text": "表主键名"
+        }
+      ]
+    },
+    {
+      "expression": "${table}",
+      "text": "",
+      "children": [
+        {
+          "expression": "${table.tableName}",
+          "text": "数据库表名"
+        },
+        {
+          "expression": "${table.comment}",
+          "text": "表注释"
+        }
+      ]
+    },
+    {
+      "expression": "#foreach($column in $csharpColumns) #end",
+      "text": "",
+      "children": [
+        {
+          "expression": "${velocityCount}",
+          "text": "foreach循环下标,从1开始"
+        },
+        {
+          "expression": "${column.columnName}",
+          "text": "表中字段名"
+        },
+        {
+          "expression": "${column.type}",
+          "text": "字段的数据库类型"
+        },
+        {
+          "expression": "${column.field}",
+          "text": "字段名"
+        },
+        {
+          "expression": "${column.property}",
+          "text": "属性名"
+        },
+        {
+          "expression": "${column.fieldType}",
+          "text": "字段类型"
+        },
+        {
+          "expression": "${column.isIdentity}",
+          "text": "是否自增,返回boolean"
+        },
+        {
+          "expression": "${column.isPk}",
+          "text": "是否主键,返回boolean"
+        },
+        {
+          "expression": "${column.isIdentityPk}",
+          "text": "是否自增主键,返回boolean"
+        },
+        {
+          "expression": "${column.comment}",
+          "text": "字段注释"
+        }
+      ]
+    }
+  ]
+}

+ 114 - 0
gen/src/main/resources/public/velocity/java.json

@@ -0,0 +1,114 @@
+{
+  "data": [
+    {
+      "expression": "${pk}",
+      "text": "主键对象,同${column}"
+    },
+    {
+      "expression": "${context}",
+      "text": "",
+      "children": [
+        {
+          "expression": "${context.dbName}",
+          "text": "数据库名"
+        },
+        {
+          "expression": "${context.packageName}",
+          "text": "包名"
+        },
+        {
+          "expression": "${context.javaBeanName}",
+          "text": "Java类名"
+        },
+        {
+          "expression": "${context.javaBeanNameLF}",
+          "text": "Java类名且首字母小写"
+        },
+        {
+          "expression": "${context.pkName}",
+          "text": "表主键名"
+        },
+        {
+          "expression": "${context.javaPkName}",
+          "text": "表主键对应的java字段名"
+        },
+        {
+          "expression": "${context.javaPkType}",
+          "text": "主键的java类型"
+        },
+        {
+          "expression": "${context.mybatisPkType}",
+          "text": "主键对应的mybatis类型"
+        }
+      ]
+    },
+    {
+      "expression": "${table}",
+      "text": "",
+      "children": [
+        {
+          "expression": "${table.tableName}",
+          "text": "数据库表名"
+        },
+        {
+          "expression": "${table.comment}",
+          "text": "表注释"
+        }
+      ]
+    },
+    {
+      "expression": "#foreach($column in $columns) #end",
+      "text": "",
+      "children": [
+        {
+          "expression": "${velocityCount}",
+          "text": "foreach循环下标,从1开始"
+        },
+        {
+          "expression": "${column.columnName}",
+          "text": "表中字段名"
+        },
+        {
+          "expression": "${column.type}",
+          "text": "字段的数据库类型"
+        },
+        {
+          "expression": "${column.javaFieldName}",
+          "text": "java字段名"
+        },
+        {
+          "expression": "${column.javaFieldNameUF}",
+          "text": "java字段名首字母大写"
+        },
+        {
+          "expression": "${column.javaType}",
+          "text": "字段的java类型"
+        },
+        {
+          "expression": "${column.javaTypeBox}",
+          "text": "字段的java装箱类型,如Integer"
+        },
+        {
+          "expression": "${column.isIdentity}",
+          "text": "是否自增,返回boolean"
+        },
+        {
+          "expression": "${column.isPk}",
+          "text": "是否主键,返回boolean"
+        },
+        {
+          "expression": "${column.isIdentityPk}",
+          "text": "是否自增主键,返回boolean"
+        },
+        {
+          "expression": "${column.mybatisJdbcType}",
+          "text": "mybatis定义的jdbcType"
+        },
+        {
+          "expression": "${column.comment}",
+          "text": "字段注释"
+        }
+      ]
+    }
+  ]
+}