数据对象实体更新

创建数据对象 Model
yun-zuoyi
wei.peng 6 years ago
parent 2ba8b1498b
commit f039095f83

@ -54,7 +54,7 @@ public class BlockFormEnumUtil {
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
if (values()[i].code.equals(code.toLowerCase())) {
tmp = values()[i].value;
}
}
@ -93,6 +93,87 @@ public class BlockFormEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FORM_TABLE_STATUS {
SYNCHRONOUS_UNDONE(1, "未完成", "未同步"),
SYNCHRONOUS_COMPLETE(2, "已完成", "已同步");
private int value;
private String code;
private String description;
private FORM_TABLE_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code.toLowerCase())) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static FORM_TABLE_STATUS valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -881,6 +962,16 @@ public class BlockFormEnumUtil {
return null;
}
public static PROPERTY_TYPE indexOf(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (val.indexOf(values()[i].value) >= 0) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
@ -1429,4 +1520,5 @@ public class BlockFormEnumUtil {
return tmp;
}
}
}

@ -153,6 +153,15 @@ public class CommonEnumUtil {
}
return tmp;
}
public static int descOf(boolean desc) {
return desc ? TRUE_OR_FALSE.TRUE.getValue() : TRUE_OR_FALSE.FALSE.getValue();
}
public static int descOf(int desc) {
return desc == 0 ? TRUE_OR_FALSE.TRUE.getValue() : TRUE_OR_FALSE.FALSE.getValue();
}
public static String valueOfDescription(int val) {return valueOf(val);}
public static int descriptionOfValue(String desc) {return descOf(desc);}

@ -47,10 +47,14 @@ public class BfDataObject extends BaseBean {
@ApiParam(value ="数据表名")
private String objectTableName;
@Column(name="OBJECT_CONTENT")
@Column(name="OBJECT_CONTENT",columnDefinition="TEXT")
@ApiParam(value ="数据内容")
private String objectContent;
@Column(name="OBJECT_STATUS")
@ApiParam(value ="表状态(是否同步)")
private Integer objectStatus;
@Column(name="OBJECT_TYPE")
@ApiParam(value ="数据类型")
private Integer objectType;

@ -0,0 +1,52 @@
package cn.estsh.i3plus.pojo.model.form;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : Adair Peng
* @CreateDate : 2019-03-22 17:17
* @Modify:
**/
@Data
public class SqlColumnModel {
// isAutoIncrement true isNullable 0 isSigned true getColumnDisplaySize 11 getColumnLabel id getColumnName id getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer
// isAutoIncrement false isNullable 1 isSigned false getColumnDisplaySize 50 getColumnLabel name getColumnName name getSchemaName getPrecision 50 getScale 0 getTableName test getColumnType 12 getColumnTypeName VARCHAR getColumnClassName java.lang.String
// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 11 getColumnLabel age getColumnName age getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer
// isAutoIncrement false isNullable 1 isSigned false getColumnDisplaySize 19 getColumnLabel date_time getColumnName date_time getSchemaName getPrecision 19 getScale 0 getTableName test getColumnType 93 getColumnTypeName TIMESTAMP getColumnClassName java.sql.Timestamp
// isAutoIncrement false isNullable 0 isSigned true getColumnDisplaySize 11 getColumnLabel test_num_not_null getColumnName test_num_not_null getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer
// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 11 getColumnLabel test_unique getColumnName test_unique getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer
// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 11 getColumnLabel test_comment getColumnName test_comment getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer
// isAutoIncrement false isNullable 1 isSigned false getColumnDisplaySize 500 getColumnLabel test_string_1000 getColumnName test_string_1000 getSchemaName getPrecision 500 getScale 0 getTableName test getColumnType 12 getColumnTypeName VARCHAR getColumnClassName java.lang.String
// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 4 getColumnLabel test_double getColumnName test_double getSchemaName getPrecision 4 getScale 2 getTableName test getColumnType 8 getColumnTypeName DOUBLE getColumnClassName java.lang.Double
// 是否自增
@ApiParam(value = "是否自增")
private Integer isAutoIncrement;
// 是否允许为空
@ApiParam(value = "是否允许为空")
private Integer isNullable;
// 是否是对象
@ApiParam(value = "是否是对象")
private Integer isSigned;
// 字段名称
@ApiParam(value = "字段名称")
private String columnName;
// 字段长度
@ApiParam(value = "字段长度")
private Integer precision;
// 字段精确长度
@ApiParam(value = "字段精确长度")
private Integer scale;
// 字段类型编号
@ApiParam(value = "字段类型编号")
private Integer columnType;
// 字段类型名称
@ApiParam(value = "字段类型名称")
private String columnTypeName;
// 字段Java 类型
@ApiParam(value = "字段Java 类型")
private String columnClassName;
}

@ -0,0 +1,31 @@
package cn.estsh.i3plus.pojo.model.form;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
import java.util.Objects;
/**
* @Description :
* @Reference :
* @Author : Adair Peng
* @CreateDate : 2019-03-22 16:40
* @Modify:
**/
@Data
public class SqlCreateDllModel {
private String tableCat;
private String tableSchem;
private String tableName;
private Integer tableType;
private String tableTypeName;
private String remarks;
private String typeCat;
private String typeName;
private String selfReferencingColName;
private String refGeneration;
List<SqlColumnModel> columnlist ;
}
Loading…
Cancel
Save