在生成的entity中增加swagger接口文档中属性说明注解
This commit is contained in:
1 parent
a002299c3e
commit
7fb34b26e7
5 files changed
+27
-3
No files matched your search
@@ -32,3 +32,6 @@ longtext=String
|
||||
date=LocalDateTime
|
||||
datetime=LocalDateTime
|
||||
timestamp=LocalDateTime
|
||||
|
||||
# hidden columns in Swagger Models
|
||||
hiddenColumn=gmt_create,gmt_modified,tenant_id
|
||||
@@ -17,7 +17,7 @@
|
||||
</select>
|
||||
|
||||
<select id="queryColumns" resultType="map">
|
||||
select column_name columnName, data_type dataType, column_comment columnComment, column_key columnKey, extra from information_schema.columns
|
||||
select column_name columnName, data_type dataType, column_comment columnComment, column_key columnKey, extra ,is_nullable as isNullable,column_type as columnType from information_schema.columns
|
||||
where table_name = #{tableName} and table_schema = (select database()) order by ordinal_position
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -49,6 +49,7 @@ private static final long serialVersionUID = 1L;
|
||||
#if($column.columnName == $pk.columnName)
|
||||
@TableId
|
||||
#end
|
||||
@ApiModelProperty(value="$column.comments"#if($column.nullable),required=$column.nullable#end#if($column.hidden),hidden=$column.hidden#end)
|
||||
private $column.attrType $column.lowerAttrName;
|
||||
#end
|
||||
|
||||
|
||||
Reference in new issue
Block a user