!139 代码生成器column增加nullable属性

Merge pull request !139 from 赤兮丷/main
This commit is contained in:
Michael Yang 2023-07-14 06:21:58 +00:00 committed by Gitee
commit 082b574bd0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 14 additions and 0 deletions

View File

@ -47,6 +47,7 @@ public abstract class JdbcDialect implements IDialect {
column.setAutoIncrement(columnMetaData.isAutoIncrement(i));
column.setNullable(columnMetaData.isNullable(i));
//注释
column.setComment(columnRemarks.get(column.getName()));

View File

@ -49,6 +49,11 @@ public class Column {
*/
private String comment;
/**
* 是否可为空
*/
private Integer nullable;
/**
* 是否为主键
*/
@ -103,6 +108,14 @@ public class Column {
this.comment = comment;
}
public Integer getNullable() {
return nullable;
}
public void setNullable(Integer nullable) {
this.nullable = nullable;
}
public boolean isPrimaryKey() {
return isPrimaryKey;
}