forked from lxm_tools/screw
✨ 新增md文档生成
This commit is contained in:
@@ -41,7 +41,11 @@ public enum EngineFileType implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* EXCEL
|
* EXCEL
|
||||||
*/
|
*/
|
||||||
EXCEL(".xsl", "documentation_excel", "EXCEL文件");
|
EXCEL(".xsl", "documentation_excel", "EXCEL文件"),
|
||||||
|
/**
|
||||||
|
* MD
|
||||||
|
*/
|
||||||
|
MD(".md", "documentation_md", "Markdown文件");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件后缀
|
* 文件后缀
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# ${title!'数据库设计文档'}
|
||||||
|
|
||||||
|
**数据库名:** ${database!''}
|
||||||
|
**文档版本:** ${version!''}
|
||||||
|
**文档描述:** ${description!''}
|
||||||
|
| 表名 | 说明 |
|
||||||
|
| :-------------------- | :--------- |
|
||||||
|
<#list tables>
|
||||||
|
<#items as t>
|
||||||
|
| [${t.tableName!''}](#${t.tableName!''}) | ${t.remarks!''} |
|
||||||
|
</#items>
|
||||||
|
</#list>
|
||||||
|
<#list tables><#items as t>
|
||||||
|
**表名:** <a id="${t.tableName!''}">${t.tableName!''}</a>
|
||||||
|
|
||||||
|
**说明:** ${t.remarks!''}
|
||||||
|
|
||||||
|
**数据列:**
|
||||||
|
|
||||||
|
<#list t.columns>
|
||||||
|
| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
|
||||||
|
| :--: | :--- | :------: | :----: | :----: | :------: | :--: | :----: | :--: |
|
||||||
|
<#items as c>
|
||||||
|
| ${c?index+1} | ${c.columnName!''} | ${c.typeName!''} | ${c.columnSize!''} | ${c.decimalDigits!'0'} | ${c.nullable!''} | ${c.primaryKey!''} | ${c.columnDef!''} | ${c.remarks!''} |
|
||||||
|
</#items>
|
||||||
|
</#list></#items>
|
||||||
|
</#list>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# #if(${_data.title}) #else 数据库设计文档 #end
|
||||||
|
|
||||||
|
#if(${_data.database})
|
||||||
|
**数据库名:** $!{_data.database}
|
||||||
|
|
||||||
|
#end
|
||||||
|
#if(${_data.version})
|
||||||
|
**文档版本:** $!{_data.version}
|
||||||
|
|
||||||
|
#end
|
||||||
|
#if(${_data.description})
|
||||||
|
**文档描述:** $!{_data.description}
|
||||||
|
#end
|
||||||
|
| 表名 | 说明 |
|
||||||
|
| :-------------------- | :--------- |
|
||||||
|
#foreach($t in $_data.tables)
|
||||||
|
| [$!{t.tableName}](#$!{t.tableName}) | $!{t.remarks} |
|
||||||
|
#end
|
||||||
|
#foreach($t in $_data.tables)
|
||||||
|
**表名:** <a id="$!{t.tableName}">$!{t.tableName}</a>
|
||||||
|
|
||||||
|
**说明:** $!{t.remarks}
|
||||||
|
|
||||||
|
**数据列:**
|
||||||
|
|
||||||
|
| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
|
||||||
|
| :--: | :--- | :------: | :----: | :----: | :------: | :--: | :----: | :--: |
|
||||||
|
#foreach($c in $t.columns)
|
||||||
|
| $!{velocityCount} | $!{c.columnName} | $!{c.typeName} | $!{c.columnSize} | #if($!{c.decimalDigits})$!{c.decimalDigits}#else 0#end | $!{c.nullable}| $!{c.primaryKey} | $!{c.columnDef} | $!{c.remarks} |
|
||||||
|
#end
|
||||||
|
#end
|
||||||
Reference in New Issue
Block a user