Browse Source

feat: add database_type model

master
vran 3 years ago
parent
commit
f15f534711
  1. 7
      dao/generated-src/jooq/main/java/com/databasir/dao/Databasir.java
  2. 4
      dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java
  3. 6
      dao/generated-src/jooq/main/java/com/databasir/dao/Tables.java
  4. 184
      dao/generated-src/jooq/main/java/com/databasir/dao/tables/DatabaseType.java
  5. 248
      dao/generated-src/jooq/main/java/com/databasir/dao/tables/pojos/DatabaseTypePojo.java
  6. 503
      dao/generated-src/jooq/main/java/com/databasir/dao/tables/records/DatabaseTypeRecord.java
  7. 16
      dao/src/main/resources/db/migration/V1.1__database_type.sql

7
dao/generated-src/jooq/main/java/com/databasir/dao/Databasir.java

@ -7,6 +7,7 @@ package com.databasir.dao;
import com.databasir.dao.tables.DataSource;
import com.databasir.dao.tables.DataSourceProperty;
import com.databasir.dao.tables.DatabaseDocument;
import com.databasir.dao.tables.DatabaseType;
import com.databasir.dao.tables.DocumentRemark;
import com.databasir.dao.tables.Group;
import com.databasir.dao.tables.Login;
@ -60,6 +61,11 @@ public class Databasir extends SchemaImpl {
*/
public final DatabaseDocument DATABASE_DOCUMENT = DatabaseDocument.DATABASE_DOCUMENT;
/**
* customer database types
*/
public final DatabaseType DATABASE_TYPE = DatabaseType.DATABASE_TYPE;
/**
* The table <code>databasir.document_remark</code>.
*/
@ -159,6 +165,7 @@ public class Databasir extends SchemaImpl {
DataSource.DATA_SOURCE,
DataSourceProperty.DATA_SOURCE_PROPERTY,
DatabaseDocument.DATABASE_DOCUMENT,
DatabaseType.DATABASE_TYPE,
DocumentRemark.DOCUMENT_REMARK,
Group.GROUP,
Login.LOGIN,

4
dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java

@ -7,6 +7,7 @@ package com.databasir.dao;
import com.databasir.dao.tables.DataSource;
import com.databasir.dao.tables.DataSourceProperty;
import com.databasir.dao.tables.DatabaseDocument;
import com.databasir.dao.tables.DatabaseType;
import com.databasir.dao.tables.DocumentRemark;
import com.databasir.dao.tables.Group;
import com.databasir.dao.tables.Login;
@ -26,6 +27,7 @@ import com.databasir.dao.tables.UserRole;
import com.databasir.dao.tables.records.DataSourcePropertyRecord;
import com.databasir.dao.tables.records.DataSourceRecord;
import com.databasir.dao.tables.records.DatabaseDocumentRecord;
import com.databasir.dao.tables.records.DatabaseTypeRecord;
import com.databasir.dao.tables.records.DocumentRemarkRecord;
import com.databasir.dao.tables.records.GroupRecord;
import com.databasir.dao.tables.records.LoginRecord;
@ -64,6 +66,8 @@ public class Keys {
public static final UniqueKey<DataSourceRecord> KEY_DATA_SOURCE_UK_PROJECT_ID = Internal.createUniqueKey(DataSource.DATA_SOURCE, DSL.name("KEY_data_source_uk_project_id"), new TableField[] { DataSource.DATA_SOURCE.PROJECT_ID }, true);
public static final UniqueKey<DataSourcePropertyRecord> KEY_DATA_SOURCE_PROPERTY_PRIMARY = Internal.createUniqueKey(DataSourceProperty.DATA_SOURCE_PROPERTY, DSL.name("KEY_data_source_property_PRIMARY"), new TableField[] { DataSourceProperty.DATA_SOURCE_PROPERTY.ID }, true);
public static final UniqueKey<DatabaseDocumentRecord> KEY_DATABASE_DOCUMENT_PRIMARY = Internal.createUniqueKey(DatabaseDocument.DATABASE_DOCUMENT, DSL.name("KEY_database_document_PRIMARY"), new TableField[] { DatabaseDocument.DATABASE_DOCUMENT.ID }, true);
public static final UniqueKey<DatabaseTypeRecord> KEY_DATABASE_TYPE_PRIMARY = Internal.createUniqueKey(DatabaseType.DATABASE_TYPE, DSL.name("KEY_database_type_PRIMARY"), new TableField[] { DatabaseType.DATABASE_TYPE.ID }, true);
public static final UniqueKey<DatabaseTypeRecord> KEY_DATABASE_TYPE_UK_DATABASE_TYPE_DELETED_DELETED_TOKEN = Internal.createUniqueKey(DatabaseType.DATABASE_TYPE, DSL.name("KEY_database_type_uk_database_type_deleted_deleted_token"), new TableField[] { DatabaseType.DATABASE_TYPE.DATABASE_TYPE_, DatabaseType.DATABASE_TYPE.DELETED, DatabaseType.DATABASE_TYPE.DELETED_TOKEN }, true);
public static final UniqueKey<DocumentRemarkRecord> KEY_DOCUMENT_REMARK_PRIMARY = Internal.createUniqueKey(DocumentRemark.DOCUMENT_REMARK, DSL.name("KEY_document_remark_PRIMARY"), new TableField[] { DocumentRemark.DOCUMENT_REMARK.ID }, true);
public static final UniqueKey<GroupRecord> KEY_GROUP_PRIMARY = Internal.createUniqueKey(Group.GROUP, DSL.name("KEY_group_PRIMARY"), new TableField[] { Group.GROUP.ID }, true);
public static final UniqueKey<LoginRecord> KEY_LOGIN_PRIMARY = Internal.createUniqueKey(Login.LOGIN, DSL.name("KEY_login_PRIMARY"), new TableField[] { Login.LOGIN.ID }, true);

6
dao/generated-src/jooq/main/java/com/databasir/dao/Tables.java

@ -7,6 +7,7 @@ package com.databasir.dao;
import com.databasir.dao.tables.DataSource;
import com.databasir.dao.tables.DataSourceProperty;
import com.databasir.dao.tables.DatabaseDocument;
import com.databasir.dao.tables.DatabaseType;
import com.databasir.dao.tables.DocumentRemark;
import com.databasir.dao.tables.Group;
import com.databasir.dao.tables.Login;
@ -46,6 +47,11 @@ public class Tables {
*/
public static final DatabaseDocument DATABASE_DOCUMENT = DatabaseDocument.DATABASE_DOCUMENT;
/**
* customer database types
*/
public static final DatabaseType DATABASE_TYPE = DatabaseType.DATABASE_TYPE;
/**
* The table <code>databasir.document_remark</code>.
*/

184
dao/generated-src/jooq/main/java/com/databasir/dao/tables/DatabaseType.java

@ -0,0 +1,184 @@
/*
* This file is generated by jOOQ.
*/
package com.databasir.dao.tables;
import com.databasir.dao.Databasir;
import com.databasir.dao.Keys;
import com.databasir.dao.tables.records.DatabaseTypeRecord;
import org.jooq.*;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
/**
* customer database types
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DatabaseType extends TableImpl<DatabaseTypeRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>databasir.database_type</code>
*/
public static final DatabaseType DATABASE_TYPE = new DatabaseType();
/**
* The class holding records for this type
*/
@Override
public Class<DatabaseTypeRecord> getRecordType() {
return DatabaseTypeRecord.class;
}
/**
* The column <code>databasir.database_type.id</code>.
*/
public final TableField<DatabaseTypeRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
/**
* The column <code>databasir.database_type.database_type</code>. such as
* mysql, postgresql, mysql5.5 and so on
*/
public final TableField<DatabaseTypeRecord, String> DATABASE_TYPE_ = createField(DSL.name("database_type"), SQLDataType.VARCHAR(128).nullable(false), this, "such as mysql, postgresql, mysql5.5 and so on");
/**
* The column <code>databasir.database_type.icon</code>.
*/
public final TableField<DatabaseTypeRecord, String> ICON = createField(DSL.name("icon"), SQLDataType.VARCHAR(512).nullable(false).defaultValue(DSL.inline("", SQLDataType.VARCHAR)), this, "");
/**
* The column <code>databasir.database_type.description</code>.
*/
public final TableField<DatabaseTypeRecord, String> DESCRIPTION = createField(DSL.name("description"), SQLDataType.VARCHAR(512).nullable(false), this, "");
/**
* The column <code>databasir.database_type.jdbc_driver_file</code>.
*/
public final TableField<DatabaseTypeRecord, String> JDBC_DRIVER_FILE = createField(DSL.name("jdbc_driver_file"), SQLDataType.VARCHAR(1024).nullable(false), this, "");
/**
* The column <code>databasir.database_type.jdbc_driver_class_name</code>.
*/
public final TableField<DatabaseTypeRecord, String> JDBC_DRIVER_CLASS_NAME = createField(DSL.name("jdbc_driver_class_name"), SQLDataType.VARCHAR(255).nullable(false), this, "");
/**
* The column <code>databasir.database_type.jdbc_protocol</code>.
*/
public final TableField<DatabaseTypeRecord, String> JDBC_PROTOCOL = createField(DSL.name("jdbc_protocol"), SQLDataType.VARCHAR(128).nullable(false), this, "");
/**
* The column <code>databasir.database_type.deleted</code>.
*/
public final TableField<DatabaseTypeRecord, Boolean> DELETED = createField(DSL.name("deleted"), SQLDataType.BOOLEAN.nullable(false).defaultValue(DSL.inline("0", SQLDataType.BOOLEAN)), this, "");
/**
* The column <code>databasir.database_type.deleted_token</code>.
*/
public final TableField<DatabaseTypeRecord, Integer> DELETED_TOKEN = createField(DSL.name("deleted_token"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.inline("0", SQLDataType.INTEGER)), this, "");
/**
* The column <code>databasir.database_type.update_at</code>.
*/
public final TableField<DatabaseTypeRecord, LocalDateTime> UPDATE_AT = createField(DSL.name("update_at"), SQLDataType.LOCALDATETIME(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.LOCALDATETIME)), this, "");
/**
* The column <code>databasir.database_type.create_at</code>.
*/
public final TableField<DatabaseTypeRecord, LocalDateTime> CREATE_AT = createField(DSL.name("create_at"), SQLDataType.LOCALDATETIME(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.LOCALDATETIME)), this, "");
private DatabaseType(Name alias, Table<DatabaseTypeRecord> aliased) {
this(alias, aliased, null);
}
private DatabaseType(Name alias, Table<DatabaseTypeRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment("customer database types"), TableOptions.table());
}
/**
* Create an aliased <code>databasir.database_type</code> table reference
*/
public DatabaseType(String alias) {
this(DSL.name(alias), DATABASE_TYPE);
}
/**
* Create an aliased <code>databasir.database_type</code> table reference
*/
public DatabaseType(Name alias) {
this(alias, DATABASE_TYPE);
}
/**
* Create a <code>databasir.database_type</code> table reference
*/
public DatabaseType() {
this(DSL.name("database_type"), null);
}
public <O extends Record> DatabaseType(Table<O> child, ForeignKey<O, DatabaseTypeRecord> key) {
super(child, key, DATABASE_TYPE);
}
@Override
public Schema getSchema() {
return aliased() ? null : Databasir.DATABASIR;
}
@Override
public Identity<DatabaseTypeRecord, Integer> getIdentity() {
return (Identity<DatabaseTypeRecord, Integer>) super.getIdentity();
}
@Override
public UniqueKey<DatabaseTypeRecord> getPrimaryKey() {
return Keys.KEY_DATABASE_TYPE_PRIMARY;
}
@Override
public List<UniqueKey<DatabaseTypeRecord>> getUniqueKeys() {
return Arrays.asList(Keys.KEY_DATABASE_TYPE_UK_DATABASE_TYPE_DELETED_DELETED_TOKEN);
}
@Override
public DatabaseType as(String alias) {
return new DatabaseType(DSL.name(alias), this);
}
@Override
public DatabaseType as(Name alias) {
return new DatabaseType(alias, this);
}
/**
* Rename this table
*/
@Override
public DatabaseType rename(String name) {
return new DatabaseType(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DatabaseType rename(Name name) {
return new DatabaseType(name, null);
}
// -------------------------------------------------------------------------
// Row11 type methods
// -------------------------------------------------------------------------
@Override
public Row11<Integer, String, String, String, String, String, String, Boolean, Integer, LocalDateTime, LocalDateTime> fieldsRow() {
return (Row11) super.fieldsRow();
}
}

248
dao/generated-src/jooq/main/java/com/databasir/dao/tables/pojos/DatabaseTypePojo.java

@ -0,0 +1,248 @@
/*
* This file is generated by jOOQ.
*/
package com.databasir.dao.tables.pojos;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* customer database types
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DatabaseTypePojo implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String databaseType;
private String icon;
private String description;
private String jdbcDriverFile;
private String jdbcDriverClassName;
private String jdbcProtocol;
private Boolean deleted;
private Integer deletedToken;
private LocalDateTime updateAt;
private LocalDateTime createAt;
public DatabaseTypePojo() {}
public DatabaseTypePojo(DatabaseTypePojo value) {
this.id = value.id;
this.databaseType = value.databaseType;
this.icon = value.icon;
this.description = value.description;
this.jdbcDriverFile = value.jdbcDriverFile;
this.jdbcDriverClassName = value.jdbcDriverClassName;
this.jdbcProtocol = value.jdbcProtocol;
this.deleted = value.deleted;
this.deletedToken = value.deletedToken;
this.updateAt = value.updateAt;
this.createAt = value.createAt;
}
public DatabaseTypePojo(
Integer id,
String databaseType,
String icon,
String description,
String jdbcDriverFile,
String jdbcDriverClassName,
String jdbcProtocol,
Boolean deleted,
Integer deletedToken,
LocalDateTime updateAt,
LocalDateTime createAt
) {
this.id = id;
this.databaseType = databaseType;
this.icon = icon;
this.description = description;
this.jdbcDriverFile = jdbcDriverFile;
this.jdbcDriverClassName = jdbcDriverClassName;
this.jdbcProtocol = jdbcProtocol;
this.deleted = deleted;
this.deletedToken = deletedToken;
this.updateAt = updateAt;
this.createAt = createAt;
}
/**
* Getter for <code>databasir.database_type.id</code>.
*/
public Integer getId() {
return this.id;
}
/**
* Setter for <code>databasir.database_type.id</code>.
*/
public void setId(Integer id) {
this.id = id;
}
/**
* Getter for <code>databasir.database_type.database_type</code>. such as
* mysql, postgresql, mysql5.5 and so on
*/
public String getDatabaseType() {
return this.databaseType;
}
/**
* Setter for <code>databasir.database_type.database_type</code>. such as
* mysql, postgresql, mysql5.5 and so on
*/
public void setDatabaseType(String databaseType) {
this.databaseType = databaseType;
}
/**
* Getter for <code>databasir.database_type.icon</code>.
*/
public String getIcon() {
return this.icon;
}
/**
* Setter for <code>databasir.database_type.icon</code>.
*/
public void setIcon(String icon) {
this.icon = icon;
}
/**
* Getter for <code>databasir.database_type.description</code>.
*/
public String getDescription() {
return this.description;
}
/**
* Setter for <code>databasir.database_type.description</code>.
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Getter for <code>databasir.database_type.jdbc_driver_file</code>.
*/
public String getJdbcDriverFile() {
return this.jdbcDriverFile;
}
/**
* Setter for <code>databasir.database_type.jdbc_driver_file</code>.
*/
public void setJdbcDriverFile(String jdbcDriverFile) {
this.jdbcDriverFile = jdbcDriverFile;
}
/**
* Getter for <code>databasir.database_type.jdbc_driver_class_name</code>.
*/
public String getJdbcDriverClassName() {
return this.jdbcDriverClassName;
}
/**
* Setter for <code>databasir.database_type.jdbc_driver_class_name</code>.
*/
public void setJdbcDriverClassName(String jdbcDriverClassName) {
this.jdbcDriverClassName = jdbcDriverClassName;
}
/**
* Getter for <code>databasir.database_type.jdbc_protocol</code>.
*/
public String getJdbcProtocol() {
return this.jdbcProtocol;
}
/**
* Setter for <code>databasir.database_type.jdbc_protocol</code>.
*/
public void setJdbcProtocol(String jdbcProtocol) {
this.jdbcProtocol = jdbcProtocol;
}
/**
* Getter for <code>databasir.database_type.deleted</code>.
*/
public Boolean getDeleted() {
return this.deleted;
}
/**
* Setter for <code>databasir.database_type.deleted</code>.
*/
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
/**
* Getter for <code>databasir.database_type.deleted_token</code>.
*/
public Integer getDeletedToken() {
return this.deletedToken;
}
/**
* Setter for <code>databasir.database_type.deleted_token</code>.
*/
public void setDeletedToken(Integer deletedToken) {
this.deletedToken = deletedToken;
}
/**
* Getter for <code>databasir.database_type.update_at</code>.
*/
public LocalDateTime getUpdateAt() {
return this.updateAt;
}
/**
* Setter for <code>databasir.database_type.update_at</code>.
*/
public void setUpdateAt(LocalDateTime updateAt) {
this.updateAt = updateAt;
}
/**
* Getter for <code>databasir.database_type.create_at</code>.
*/
public LocalDateTime getCreateAt() {
return this.createAt;
}
/**
* Setter for <code>databasir.database_type.create_at</code>.
*/
public void setCreateAt(LocalDateTime createAt) {
this.createAt = createAt;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("DatabaseTypePojo (");
sb.append(id);
sb.append(", ").append(databaseType);
sb.append(", ").append(icon);
sb.append(", ").append(description);
sb.append(", ").append(jdbcDriverFile);
sb.append(", ").append(jdbcDriverClassName);
sb.append(", ").append(jdbcProtocol);
sb.append(", ").append(deleted);
sb.append(", ").append(deletedToken);
sb.append(", ").append(updateAt);
sb.append(", ").append(createAt);
sb.append(")");
return sb.toString();
}
}

503
dao/generated-src/jooq/main/java/com/databasir/dao/tables/records/DatabaseTypeRecord.java

@ -0,0 +1,503 @@
/*
* This file is generated by jOOQ.
*/
package com.databasir.dao.tables.records;
import com.databasir.dao.tables.DatabaseType;
import com.databasir.dao.tables.pojos.DatabaseTypePojo;
import java.time.LocalDateTime;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record11;
import org.jooq.Row11;
import org.jooq.impl.UpdatableRecordImpl;
/**
* customer database types
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DatabaseTypeRecord extends UpdatableRecordImpl<DatabaseTypeRecord> implements Record11<Integer, String, String, String, String, String, String, Boolean, Integer, LocalDateTime, LocalDateTime> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>databasir.database_type.id</code>.
*/
public void setId(Integer value) {
set(0, value);
}
/**
* Getter for <code>databasir.database_type.id</code>.
*/
public Integer getId() {
return (Integer) get(0);
}
/**
* Setter for <code>databasir.database_type.database_type</code>. such as
* mysql, postgresql, mysql5.5 and so on
*/
public void setDatabaseType(String value) {
set(1, value);
}
/**
* Getter for <code>databasir.database_type.database_type</code>. such as
* mysql, postgresql, mysql5.5 and so on
*/
public String getDatabaseType() {
return (String) get(1);
}
/**
* Setter for <code>databasir.database_type.icon</code>.
*/
public void setIcon(String value) {
set(2, value);
}
/**
* Getter for <code>databasir.database_type.icon</code>.
*/
public String getIcon() {
return (String) get(2);
}
/**
* Setter for <code>databasir.database_type.description</code>.
*/
public void setDescription(String value) {
set(3, value);
}
/**
* Getter for <code>databasir.database_type.description</code>.
*/
public String getDescription() {
return (String) get(3);
}
/**
* Setter for <code>databasir.database_type.jdbc_driver_file</code>.
*/
public void setJdbcDriverFile(String value) {
set(4, value);
}
/**
* Getter for <code>databasir.database_type.jdbc_driver_file</code>.
*/
public String getJdbcDriverFile() {
return (String) get(4);
}
/**
* Setter for <code>databasir.database_type.jdbc_driver_class_name</code>.
*/
public void setJdbcDriverClassName(String value) {
set(5, value);
}
/**
* Getter for <code>databasir.database_type.jdbc_driver_class_name</code>.
*/
public String getJdbcDriverClassName() {
return (String) get(5);
}
/**
* Setter for <code>databasir.database_type.jdbc_protocol</code>.
*/
public void setJdbcProtocol(String value) {
set(6, value);
}
/**
* Getter for <code>databasir.database_type.jdbc_protocol</code>.
*/
public String getJdbcProtocol() {
return (String) get(6);
}
/**
* Setter for <code>databasir.database_type.deleted</code>.
*/
public void setDeleted(Boolean value) {
set(7, value);
}
/**
* Getter for <code>databasir.database_type.deleted</code>.
*/
public Boolean getDeleted() {
return (Boolean) get(7);
}
/**
* Setter for <code>databasir.database_type.deleted_token</code>.
*/
public void setDeletedToken(Integer value) {
set(8, value);
}
/**
* Getter for <code>databasir.database_type.deleted_token</code>.
*/
public Integer getDeletedToken() {
return (Integer) get(8);
}
/**
* Setter for <code>databasir.database_type.update_at</code>.
*/
public void setUpdateAt(LocalDateTime value) {
set(9, value);
}
/**
* Getter for <code>databasir.database_type.update_at</code>.
*/
public LocalDateTime getUpdateAt() {
return (LocalDateTime) get(9);
}
/**
* Setter for <code>databasir.database_type.create_at</code>.
*/
public void setCreateAt(LocalDateTime value) {
set(10, value);
}
/**
* Getter for <code>databasir.database_type.create_at</code>.
*/
public LocalDateTime getCreateAt() {
return (LocalDateTime) get(10);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<Integer> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Record11 type implementation
// -------------------------------------------------------------------------
@Override
public Row11<Integer, String, String, String, String, String, String, Boolean, Integer, LocalDateTime, LocalDateTime> fieldsRow() {
return (Row11) super.fieldsRow();
}
@Override
public Row11<Integer, String, String, String, String, String, String, Boolean, Integer, LocalDateTime, LocalDateTime> valuesRow() {
return (Row11) super.valuesRow();
}
@Override
public Field<Integer> field1() {
return DatabaseType.DATABASE_TYPE.ID;
}
@Override
public Field<String> field2() {
return DatabaseType.DATABASE_TYPE.DATABASE_TYPE_;
}
@Override
public Field<String> field3() {
return DatabaseType.DATABASE_TYPE.ICON;
}
@Override
public Field<String> field4() {
return DatabaseType.DATABASE_TYPE.DESCRIPTION;
}
@Override
public Field<String> field5() {
return DatabaseType.DATABASE_TYPE.JDBC_DRIVER_FILE;
}
@Override
public Field<String> field6() {
return DatabaseType.DATABASE_TYPE.JDBC_DRIVER_CLASS_NAME;
}
@Override
public Field<String> field7() {
return DatabaseType.DATABASE_TYPE.JDBC_PROTOCOL;
}
@Override
public Field<Boolean> field8() {
return DatabaseType.DATABASE_TYPE.DELETED;
}
@Override
public Field<Integer> field9() {
return DatabaseType.DATABASE_TYPE.DELETED_TOKEN;
}
@Override
public Field<LocalDateTime> field10() {
return DatabaseType.DATABASE_TYPE.UPDATE_AT;
}
@Override
public Field<LocalDateTime> field11() {
return DatabaseType.DATABASE_TYPE.CREATE_AT;
}
@Override
public Integer component1() {
return getId();
}
@Override
public String component2() {
return getDatabaseType();
}
@Override
public String component3() {
return getIcon();
}
@Override
public String component4() {
return getDescription();
}
@Override
public String component5() {
return getJdbcDriverFile();
}
@Override
public String component6() {
return getJdbcDriverClassName();
}
@Override
public String component7() {
return getJdbcProtocol();
}
@Override
public Boolean component8() {
return getDeleted();
}
@Override
public Integer component9() {
return getDeletedToken();
}
@Override
public LocalDateTime component10() {
return getUpdateAt();
}
@Override
public LocalDateTime component11() {
return getCreateAt();
}
@Override
public Integer value1() {
return getId();
}
@Override
public String value2() {
return getDatabaseType();
}
@Override
public String value3() {
return getIcon();
}
@Override
public String value4() {
return getDescription();
}
@Override
public String value5() {
return getJdbcDriverFile();
}
@Override
public String value6() {
return getJdbcDriverClassName();
}
@Override
public String value7() {
return getJdbcProtocol();
}
@Override
public Boolean value8() {
return getDeleted();
}
@Override
public Integer value9() {
return getDeletedToken();
}
@Override
public LocalDateTime value10() {
return getUpdateAt();
}
@Override
public LocalDateTime value11() {
return getCreateAt();
}
@Override
public DatabaseTypeRecord value1(Integer value) {
setId(value);
return this;
}
@Override
public DatabaseTypeRecord value2(String value) {
setDatabaseType(value);
return this;
}
@Override
public DatabaseTypeRecord value3(String value) {
setIcon(value);
return this;
}
@Override
public DatabaseTypeRecord value4(String value) {
setDescription(value);
return this;
}
@Override
public DatabaseTypeRecord value5(String value) {
setJdbcDriverFile(value);
return this;
}
@Override
public DatabaseTypeRecord value6(String value) {
setJdbcDriverClassName(value);
return this;
}
@Override
public DatabaseTypeRecord value7(String value) {
setJdbcProtocol(value);
return this;
}
@Override
public DatabaseTypeRecord value8(Boolean value) {
setDeleted(value);
return this;
}
@Override
public DatabaseTypeRecord value9(Integer value) {
setDeletedToken(value);
return this;
}
@Override
public DatabaseTypeRecord value10(LocalDateTime value) {
setUpdateAt(value);
return this;
}
@Override
public DatabaseTypeRecord value11(LocalDateTime value) {
setCreateAt(value);
return this;
}
@Override
public DatabaseTypeRecord values(Integer value1, String value2, String value3, String value4, String value5, String value6, String value7, Boolean value8, Integer value9, LocalDateTime value10, LocalDateTime value11) {
value1(value1);
value2(value2);
value3(value3);
value4(value4);
value5(value5);
value6(value6);
value7(value7);
value8(value8);
value9(value9);
value10(value10);
value11(value11);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached DatabaseTypeRecord
*/
public DatabaseTypeRecord() {
super(DatabaseType.DATABASE_TYPE);
}
/**
* Create a detached, initialised DatabaseTypeRecord
*/
public DatabaseTypeRecord(Integer id, String databaseType, String icon, String description, String jdbcDriverFile, String jdbcDriverClassName, String jdbcProtocol, Boolean deleted, Integer deletedToken, LocalDateTime updateAt, LocalDateTime createAt) {
super(DatabaseType.DATABASE_TYPE);
setId(id);
setDatabaseType(databaseType);
setIcon(icon);
setDescription(description);
setJdbcDriverFile(jdbcDriverFile);
setJdbcDriverClassName(jdbcDriverClassName);
setJdbcProtocol(jdbcProtocol);
setDeleted(deleted);
setDeletedToken(deletedToken);
setUpdateAt(updateAt);
setCreateAt(createAt);
}
/**
* Create a detached, initialised DatabaseTypeRecord
*/
public DatabaseTypeRecord(DatabaseTypePojo value) {
super(DatabaseType.DATABASE_TYPE);
if (value != null) {
setId(value.getId());
setDatabaseType(value.getDatabaseType());
setIcon(value.getIcon());
setDescription(value.getDescription());
setJdbcDriverFile(value.getJdbcDriverFile());
setJdbcDriverClassName(value.getJdbcDriverClassName());
setJdbcProtocol(value.getJdbcProtocol());
setDeleted(value.getDeleted());
setDeletedToken(value.getDeletedToken());
setUpdateAt(value.getUpdateAt());
setCreateAt(value.getCreateAt());
}
}
}

16
dao/src/main/resources/db/migration/V1.1__database_type.sql

@ -0,0 +1,16 @@
CREATE TABLE IF NOT EXISTS database_type
(
id INT PRIMARY KEY AUTO_INCREMENT,
database_type VARCHAR(128) NOT NULL COMMENT 'such as mysql, postgresql, mysql5.5 and so on',
icon VARCHAR(512) NOT NULL DEFAULT '',
description VARCHAR(512) NOT NULL,
jdbc_driver_file VARCHAR(1024) NOT NULL,
jdbc_driver_class_name VARCHAR(255) NOT NULL,
jdbc_protocol VARCHAR(128) NOT NULL,
deleted BOOLEAN NOT NULL DEFAULT FALSE,
deleted_token INT NOT NULL DEFAULT 0,
update_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
create_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT uk_database_type_deleted_deleted_token UNIQUE (database_type, deleted, deleted_token)
) CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci COMMENT 'customer database types';
Loading…
Cancel
Save