mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
代码生成器column增加nullable属性
This commit is contained in:
parent
53396bcac0
commit
3923e68d97
@ -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()));
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user