All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.singlehtml.include.table.ftl Maven / Gradle / Ivy

The newest version!
[#ftl]
[#macro drawtable table]
表格${table.qualifiedName?lower_case}
  • 表格说明
[#t/] [#t/] [#t/] [#t/] [#t/] [#t/] [#t/] [#t/]
表名主键注释
${table.qualifiedName?lower_case}[#if table.primaryKey??][#list table.primaryKey.columns as c]${c.value?lower_case}[#if c_has_next],[/#if][/#list][/#if]${table.comment!}
  • 表格中的列
[#t/] [#t/] [#t/] [#t/] [#t/] [#t/] [#t/] [#list table.columns as col] [#t/] [#t/] [#t/] [#t/] [#t/] [#t/] [#t/] [/#list]
序号字段名字段类型是否可空描述引用表
${col_index+1}${col.name.value?lower_case}${col.sqlType.name?lower_case}${col.nullable?string("是","否")}${col.comment!}[#assign finded=false][#t/] [#list table.foreignKeys as fk] [#if !finded] [#list fk.columns as fcol] [#if fcol.value==col.name] [#assign fkt=fk.referencedTable/] ${fk.referencedTable.qualifiedName?lower_case}[#assign finded=true][#break/] [/#if] [/#list] [/#if] [/#list]
[#if table.uniqueKeys?size>0]
  • 表格中唯一约束
[#t/] [#t/] [#t/] [#list table.uniqueKeys as uk] [#t/] [#t/] [#t/] [#t/] [/#list]
序号约束名约束字段
${uk_index+1}${uk.name.value?lower_case}[#list uk.columns as c]${c.value?lower_case}[#if c_has_next],[/#if][/#list]
[/#if] [#if table.indexes?size>0]
  • 表格的索引
[#t/] [#t/] [#t/] [#list table.indexes as idx] [#t/] [#t/] [#t/] [#t/] [/#list]
索引名索引字段是否唯一
${idx.name.value?lower_case}[#list idx.columns as c]${c.value?lower_case}[#if c_has_next],[/#if][/#list]${idx.unique?string("是","否")}
[/#if]
[/#macro]




© 2015 - 2024 Weber Informatics LLC | Privacy Policy