@Target(value=FIELD) @Retention(value=RUNTIME) @Documented public @interface Column
Modifier and Type | Optional Element and Description |
---|---|
String |
comment
数据表字段备注
1.3.0版本支持,也可通过注解实现:com.gitee.sunchenbin.mybatis.actable.annotation.Comment
|
int |
decimalLength
小数点长度,默认是0
类型默认长度参考:com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant
1.3.0版本支持,类同javax.persistence.Column.scale
|
String |
defaultValue
默认值,默认为null
1.3.0版本支持,也可通过注解实现:com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue
|
boolean |
isAutoIncrement
是否自动递增,默认false
也可通过注解实现:com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement
|
boolean |
isKey
是否是主键,默认false
也可通过注解实现:com.gitee.sunchenbin.mybatis.actable.annotation.IsKey
1.3.0版本支持,类同javax.persistence.Id
|
boolean |
isNull
是否为可以为null,true是可以,false是不可以,默认为true
也可通过注解实现:com.gitee.sunchenbin.mybatis.actable.annotation.IsNotNull
1.3.0版本支持,类同javax.persistence.Column.nullable
|
int |
length
字段长度,默认是255
类型默认长度参考:com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant
1.3.0版本支持,类同javax.persistence.Column.length
|
String |
name
字段名
1.3.0版本支持,类同javax.persistence.Column.name
|
MySqlTypeConstant |
type
字段类型:不填默认使用属性的数据类型进行转换,转换失败的字段不会添加
仅支持com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant中的枚举数据类型
不填默认转换类:com.gitee.sunchenbin.mybatis.actable.command.JavaToMysqlType
1.3.0版本支持,也可通过注解实现:com.gitee.sunchenbin.mybatis.actable.annotation.ColumnType
|
String |
value
字段名
1.4.0版本支持,类同javax.persistence.Column.name
|
public abstract String value
public abstract String name
public abstract MySqlTypeConstant type
public abstract int length
public abstract int decimalLength
public abstract boolean isNull
public abstract boolean isKey
public abstract boolean isAutoIncrement
public abstract String defaultValue
public abstract String comment
Copyright © 2020. All rights reserved.