@Target(value={FIELD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented @TableField @ColumnType @IsNotNull @IsKey @IsAutoIncrement @ColumnDefault @ColumnComment public @interface Column
| 限定符和类型 | 可选元素和说明 |
|---|---|
String |
comment
数据表字段备注
也可通过注解实现:com.tangzc.mpe.actable.annotation.Comment
|
int |
decimalLength
小数点长度,默认是0
类型默认长度参考:com.tangzc.mpe.actable.constants.MySqlTypeConstant
|
String |
defaultValue
默认值,默认为null
也可通过注解实现:com.tangzc.mpe.actable.annotation.ColumnDefault
|
boolean |
isAutoIncrement
是否自动递增,默认false
也可通过注解实现:com.tangzc.mpe.actable.annotation.IsAutoIncrement
|
boolean |
isKey
是否是主键,默认false
也可通过注解实现:com.tangzc.mpe.actable.annotation.IsKey
|
int |
length
字段长度,默认是255
类型默认长度参考:com.tangzc.mpe.actable.constants.MySqlTypeConstant
|
boolean |
notNull
是否为可以为null,true是可以,false是不可以,默认为true
也可通过注解实现:com.tangzc.mpe.actable.annotation.IsNotNull
|
MySqlTypeConstant |
type
字段类型:不填默认使用属性的数据类型进行转换,转换失败的字段不会添加
仅支持com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant中的枚举数据类型
不填默认转换类:com.tangzc.mpe.actable.command.JavaToMysqlType
|
String |
value
字段名
|
@AliasFor(annotation=com.baomidou.mybatisplus.annotation.TableField.class,
attribute="value")
public abstract String value
@AliasFor(annotation=ColumnType.class, attribute="value") public abstract MySqlTypeConstant type
@AliasFor(annotation=ColumnType.class, attribute="length") public abstract int length
@AliasFor(annotation=ColumnType.class, attribute="decimalLength") public abstract int decimalLength
@AliasFor(annotation=IsNotNull.class, attribute="value") public abstract boolean notNull
@AliasFor(annotation=IsKey.class, attribute="value") public abstract boolean isKey
@AliasFor(annotation=IsAutoIncrement.class, attribute="value") public abstract boolean isAutoIncrement
@AliasFor(annotation=ColumnDefault.class, attribute="value") public abstract String defaultValue
@AliasFor(annotation=ColumnComment.class, attribute="value") public abstract String comment
Copyright © 2021. All rights reserved.