package foundation.data.rule;
|
|
import foundation.data.entity.Entity;
|
|
public class FieldRule {
|
|
private String fieldName;
|
private boolean notNull;
|
private String defaultValue;
|
private String validateExpression;
|
|
|
public FieldRule() {
|
|
}
|
|
public void load(Entity entity) {
|
fieldName = entity.getString("field_name");
|
notNull = entity.getBoolean("is_not_null", false);
|
defaultValue = entity.getString("default_value");
|
}
|
|
public String getFieldName() {
|
return fieldName;
|
}
|
|
public boolean isNotNull() {
|
return notNull;
|
}
|
|
public String getDefaultValue() {
|
return defaultValue;
|
}
|
|
public String getValidateExpression() {
|
return validateExpression;
|
}
|
|
}
|