mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08:24 +08:00
style: 添加 ColumnConfig 类的属性注释。
This commit is contained in:
parent
04f2826176
commit
1b1d469891
@ -1,4 +1,4 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||||
* <p>
|
* <p>
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -21,30 +21,81 @@ import org.apache.ibatis.type.TypeHandler;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表字段的单独设置。
|
||||||
|
*/
|
||||||
public class ColumnConfig implements Serializable {
|
public class ColumnConfig implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段名称。
|
||||||
|
*/
|
||||||
private String columnName;
|
private String columnName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert 的时候默认值,这个值会直接被拼接到 sql 而不通过参数设置。
|
||||||
|
*/
|
||||||
private String onInsertValue;
|
private String onInsertValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update 的时候自动赋值,这个值会直接被拼接到 sql 而不通过参数设置。
|
||||||
|
*/
|
||||||
private String onUpdateValue;
|
private String onUpdateValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是大字段,大字段 APT 不会生成到 DEFAULT_COLUMNS 里。
|
||||||
|
*/
|
||||||
private Boolean isLarge;
|
private Boolean isLarge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是逻辑删除字段,一张表中只能存在 1 一个逻辑删除字段。
|
||||||
|
*/
|
||||||
private Boolean isLogicDelete;
|
private Boolean isLogicDelete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为乐观锁字段。
|
||||||
|
*/
|
||||||
private Boolean version;
|
private Boolean version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置的 jdbcType。
|
||||||
|
*/
|
||||||
private JdbcType jdbcType;
|
private JdbcType jdbcType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义 TypeHandler。
|
||||||
|
*/
|
||||||
private Class<? extends TypeHandler> typeHandler;
|
private Class<? extends TypeHandler> typeHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 脱敏方式。
|
||||||
|
*/
|
||||||
private String mask;
|
private String mask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段是否为主键。
|
||||||
|
*/
|
||||||
private boolean isPrimaryKey = false;
|
private boolean isPrimaryKey = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID 生成策略。
|
||||||
|
*/
|
||||||
private KeyType keyType;
|
private KeyType keyType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID 生成器值。
|
||||||
|
*/
|
||||||
private String keyValue;
|
private String keyValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sequence 序列执行顺序。
|
||||||
|
*/
|
||||||
private Boolean keyBefore;
|
private Boolean keyBefore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是租户 ID。
|
||||||
|
*/
|
||||||
private Boolean tenantId;
|
private Boolean tenantId;
|
||||||
|
|
||||||
|
|
||||||
public String getColumnName() {
|
public String getColumnName() {
|
||||||
return columnName;
|
return columnName;
|
||||||
}
|
}
|
||||||
@ -156,4 +207,5 @@ public class ColumnConfig implements Serializable {
|
|||||||
public void setTenantId(Boolean tenantId) {
|
public void setTenantId(Boolean tenantId) {
|
||||||
this.tenantId = tenantId;
|
this.tenantId = tenantId;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user