代码生成器column增加nullable属性

This commit is contained in:
cgc 2023-07-14 14:00:46 +08:00
parent 53396bcac0
commit 3923e68d97
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;
}