feat: jooq generate oauth_app_property

This commit is contained in:
vran 2022-12-10 20:41:06 +08:00
parent 396fa2f6ae
commit 542a4009b6
8 changed files with 606 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import com.databasir.dao.tables.DocumentTemplatePropertyTable;
import com.databasir.dao.tables.GroupTable;
import com.databasir.dao.tables.LoginTable;
import com.databasir.dao.tables.MockDataRuleTable;
import com.databasir.dao.tables.OauthAppPropertyTable;
import com.databasir.dao.tables.OauthAppTable;
import com.databasir.dao.tables.OperationLogTable;
import com.databasir.dao.tables.ProjectSyncRuleTable;
@ -112,6 +113,11 @@ public class Databasir extends SchemaImpl {
*/
public final OauthAppTable OAUTH_APP = OauthAppTable.OAUTH_APP;
/**
* The table <code>databasir.oauth_app_property</code>.
*/
public final OauthAppPropertyTable OAUTH_APP_PROPERTY = OauthAppPropertyTable.OAUTH_APP_PROPERTY;
/**
* The table <code>databasir.operation_log</code>.
*/
@ -210,6 +216,7 @@ public class Databasir extends SchemaImpl {
LoginTable.LOGIN,
MockDataRuleTable.MOCK_DATA_RULE,
OauthAppTable.OAUTH_APP,
OauthAppPropertyTable.OAUTH_APP_PROPERTY,
OperationLogTable.OPERATION_LOG,
ProjectTable.PROJECT,
ProjectSyncRuleTable.PROJECT_SYNC_RULE,

View File

@ -7,6 +7,7 @@ package com.databasir.dao;
import com.databasir.dao.tables.DataSourcePropertyTable;
import com.databasir.dao.tables.DocumentDiscussionTable;
import com.databasir.dao.tables.DocumentFullTextTable;
import com.databasir.dao.tables.OauthAppPropertyTable;
import com.databasir.dao.tables.ProjectSyncTaskTable;
import com.databasir.dao.tables.TableColumnDocumentTable;
import com.databasir.dao.tables.TableDocumentTable;
@ -41,6 +42,7 @@ public class Indexes {
public static final Index TABLE_INDEX_DOCUMENT_IDX_DATABASE_DOCUMENT_ID = Internal.createIndex(DSL.name("idx_database_document_id"), TableIndexDocumentTable.TABLE_INDEX_DOCUMENT, new OrderField[] { TableIndexDocumentTable.TABLE_INDEX_DOCUMENT.DATABASE_DOCUMENT_ID }, false);
public static final Index TABLE_TRIGGER_DOCUMENT_IDX_DATABASE_DOCUMENT_ID = Internal.createIndex(DSL.name("idx_database_document_id"), TableTriggerDocumentTable.TABLE_TRIGGER_DOCUMENT, new OrderField[] { TableTriggerDocumentTable.TABLE_TRIGGER_DOCUMENT.DATABASE_DOCUMENT_ID }, false);
public static final Index DOCUMENT_FULL_TEXT_IDX_GROUP_ID = Internal.createIndex(DSL.name("IDX_GROUP_ID"), DocumentFullTextTable.DOCUMENT_FULL_TEXT, new OrderField[] { DocumentFullTextTable.DOCUMENT_FULL_TEXT.GROUP_ID }, false);
public static final Index OAUTH_APP_PROPERTY_IDX_OAUTH_APP_ID = Internal.createIndex(DSL.name("idx_oauth_app_id"), OauthAppPropertyTable.OAUTH_APP_PROPERTY, new OrderField[] { OauthAppPropertyTable.OAUTH_APP_PROPERTY.OAUTH_APP_ID }, false);
public static final Index DOCUMENT_DISCUSSION_IDX_PROJECT_ID = Internal.createIndex(DSL.name("idx_project_id"), DocumentDiscussionTable.DOCUMENT_DISCUSSION, new OrderField[] { DocumentDiscussionTable.DOCUMENT_DISCUSSION.PROJECT_ID }, false);
public static final Index DOCUMENT_FULL_TEXT_IDX_PROJECT_ID = Internal.createIndex(DSL.name("IDX_PROJECT_ID"), DocumentFullTextTable.DOCUMENT_FULL_TEXT, new OrderField[] { DocumentFullTextTable.DOCUMENT_FULL_TEXT.PROJECT_ID }, false);
public static final Index PROJECT_SYNC_TASK_IDX_PROJECT_ID = Internal.createIndex(DSL.name("idx_project_id"), ProjectSyncTaskTable.PROJECT_SYNC_TASK, new OrderField[] { ProjectSyncTaskTable.PROJECT_SYNC_TASK.PROJECT_ID }, false);

View File

@ -15,6 +15,7 @@ import com.databasir.dao.tables.DocumentTemplatePropertyTable;
import com.databasir.dao.tables.GroupTable;
import com.databasir.dao.tables.LoginTable;
import com.databasir.dao.tables.MockDataRuleTable;
import com.databasir.dao.tables.OauthAppPropertyTable;
import com.databasir.dao.tables.OauthAppTable;
import com.databasir.dao.tables.OperationLogTable;
import com.databasir.dao.tables.ProjectSyncRuleTable;
@ -41,6 +42,7 @@ import com.databasir.dao.tables.records.DocumentTemplatePropertyRecord;
import com.databasir.dao.tables.records.GroupRecord;
import com.databasir.dao.tables.records.LoginRecord;
import com.databasir.dao.tables.records.MockDataRuleRecord;
import com.databasir.dao.tables.records.OauthAppPropertyRecord;
import com.databasir.dao.tables.records.OauthAppRecord;
import com.databasir.dao.tables.records.OperationLogRecord;
import com.databasir.dao.tables.records.ProjectRecord;
@ -94,6 +96,7 @@ public class Keys {
public static final UniqueKey<MockDataRuleRecord> KEY_MOCK_DATA_RULE_UK_PROJECT_ID_TABLE_NAME_COLUMN_NAME = Internal.createUniqueKey(MockDataRuleTable.MOCK_DATA_RULE, DSL.name("KEY_mock_data_rule_uk_project_id_table_name_column_name"), new TableField[] { MockDataRuleTable.MOCK_DATA_RULE.PROJECT_ID, MockDataRuleTable.MOCK_DATA_RULE.TABLE_NAME, MockDataRuleTable.MOCK_DATA_RULE.COLUMN_NAME }, true);
public static final UniqueKey<OauthAppRecord> KEY_OAUTH_APP_PRIMARY = Internal.createUniqueKey(OauthAppTable.OAUTH_APP, DSL.name("KEY_oauth_app_PRIMARY"), new TableField[] { OauthAppTable.OAUTH_APP.ID }, true);
public static final UniqueKey<OauthAppRecord> KEY_OAUTH_APP_UK_REGISTRATION_ID = Internal.createUniqueKey(OauthAppTable.OAUTH_APP, DSL.name("KEY_oauth_app_uk_registration_id"), new TableField[] { OauthAppTable.OAUTH_APP.REGISTRATION_ID }, true);
public static final UniqueKey<OauthAppPropertyRecord> KEY_OAUTH_APP_PROPERTY_PRIMARY = Internal.createUniqueKey(OauthAppPropertyTable.OAUTH_APP_PROPERTY, DSL.name("KEY_oauth_app_property_PRIMARY"), new TableField[] { OauthAppPropertyTable.OAUTH_APP_PROPERTY.ID }, true);
public static final UniqueKey<OperationLogRecord> KEY_OPERATION_LOG_PRIMARY = Internal.createUniqueKey(OperationLogTable.OPERATION_LOG, DSL.name("KEY_operation_log_PRIMARY"), new TableField[] { OperationLogTable.OPERATION_LOG.ID }, true);
public static final UniqueKey<ProjectRecord> KEY_PROJECT_PRIMARY = Internal.createUniqueKey(ProjectTable.PROJECT, DSL.name("KEY_project_PRIMARY"), new TableField[] { ProjectTable.PROJECT.ID }, true);
public static final UniqueKey<ProjectRecord> KEY_PROJECT_UK_GROUP_ID_NAME_DELETED_TOKEN = Internal.createUniqueKey(ProjectTable.PROJECT, DSL.name("KEY_project_uk_group_id_name_deleted_token"), new TableField[] { ProjectTable.PROJECT.GROUP_ID, ProjectTable.PROJECT.NAME, ProjectTable.PROJECT.DELETED_TOKEN }, true);

View File

@ -15,6 +15,7 @@ import com.databasir.dao.tables.DocumentTemplatePropertyTable;
import com.databasir.dao.tables.GroupTable;
import com.databasir.dao.tables.LoginTable;
import com.databasir.dao.tables.MockDataRuleTable;
import com.databasir.dao.tables.OauthAppPropertyTable;
import com.databasir.dao.tables.OauthAppTable;
import com.databasir.dao.tables.OperationLogTable;
import com.databasir.dao.tables.ProjectSyncRuleTable;
@ -98,6 +99,11 @@ public class Tables {
*/
public static final OauthAppTable OAUTH_APP = OauthAppTable.OAUTH_APP;
/**
* The table <code>databasir.oauth_app_property</code>.
*/
public static final OauthAppPropertyTable OAUTH_APP_PROPERTY = OauthAppPropertyTable.OAUTH_APP_PROPERTY;
/**
* The table <code>databasir.operation_log</code>.
*/

View File

@ -0,0 +1,169 @@
/*
* This file is generated by jOOQ.
*/
package com.databasir.dao.tables;
import com.databasir.dao.Databasir;
import com.databasir.dao.Indexes;
import com.databasir.dao.Keys;
import com.databasir.dao.tables.records.OauthAppPropertyRecord;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.Index;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Row5;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class OauthAppPropertyTable extends TableImpl<OauthAppPropertyRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>databasir.oauth_app_property</code>
*/
public static final OauthAppPropertyTable OAUTH_APP_PROPERTY = new OauthAppPropertyTable();
/**
* The class holding records for this type
*/
@Override
public Class<OauthAppPropertyRecord> getRecordType() {
return OauthAppPropertyRecord.class;
}
/**
* The column <code>databasir.oauth_app_property.id</code>.
*/
public final TableField<OauthAppPropertyRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
/**
* The column <code>databasir.oauth_app_property.oauth_app_id</code>.
* oauth_app.id
*/
public final TableField<OauthAppPropertyRecord, Integer> OAUTH_APP_ID = createField(DSL.name("oauth_app_id"), SQLDataType.INTEGER.nullable(false), this, "oauth_app.id");
/**
* The column <code>databasir.oauth_app_property.name</code>.
*/
public final TableField<OauthAppPropertyRecord, String> NAME = createField(DSL.name("name"), SQLDataType.CLOB.nullable(false), this, "");
/**
* The column <code>databasir.oauth_app_property.value</code>.
*/
public final TableField<OauthAppPropertyRecord, String> VALUE = createField(DSL.name("value"), SQLDataType.CLOB.nullable(false), this, "");
/**
* The column <code>databasir.oauth_app_property.create_at</code>.
*/
public final TableField<OauthAppPropertyRecord, LocalDateTime> CREATE_AT = createField(DSL.name("create_at"), SQLDataType.LOCALDATETIME(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.LOCALDATETIME)), this, "");
private OauthAppPropertyTable(Name alias, Table<OauthAppPropertyRecord> aliased) {
this(alias, aliased, null);
}
private OauthAppPropertyTable(Name alias, Table<OauthAppPropertyRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
}
/**
* Create an aliased <code>databasir.oauth_app_property</code> table
* reference
*/
public OauthAppPropertyTable(String alias) {
this(DSL.name(alias), OAUTH_APP_PROPERTY);
}
/**
* Create an aliased <code>databasir.oauth_app_property</code> table
* reference
*/
public OauthAppPropertyTable(Name alias) {
this(alias, OAUTH_APP_PROPERTY);
}
/**
* Create a <code>databasir.oauth_app_property</code> table reference
*/
public OauthAppPropertyTable() {
this(DSL.name("oauth_app_property"), null);
}
public <O extends Record> OauthAppPropertyTable(Table<O> child, ForeignKey<O, OauthAppPropertyRecord> key) {
super(child, key, OAUTH_APP_PROPERTY);
}
@Override
public Schema getSchema() {
return aliased() ? null : Databasir.DATABASIR;
}
@Override
public List<Index> getIndexes() {
return Arrays.asList(Indexes.OAUTH_APP_PROPERTY_IDX_OAUTH_APP_ID);
}
@Override
public Identity<OauthAppPropertyRecord, Integer> getIdentity() {
return (Identity<OauthAppPropertyRecord, Integer>) super.getIdentity();
}
@Override
public UniqueKey<OauthAppPropertyRecord> getPrimaryKey() {
return Keys.KEY_OAUTH_APP_PROPERTY_PRIMARY;
}
@Override
public OauthAppPropertyTable as(String alias) {
return new OauthAppPropertyTable(DSL.name(alias), this);
}
@Override
public OauthAppPropertyTable as(Name alias) {
return new OauthAppPropertyTable(alias, this);
}
/**
* Rename this table
*/
@Override
public OauthAppPropertyTable rename(String name) {
return new OauthAppPropertyTable(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public OauthAppPropertyTable rename(Name name) {
return new OauthAppPropertyTable(name, null);
}
// -------------------------------------------------------------------------
// Row5 type methods
// -------------------------------------------------------------------------
@Override
public Row5<Integer, Integer, String, String, LocalDateTime> fieldsRow() {
return (Row5) super.fieldsRow();
}
}

View File

@ -0,0 +1,134 @@
/*
* This file is generated by jOOQ.
*/
package com.databasir.dao.tables.pojos;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class OauthAppProperty implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private Integer oauthAppId;
private String name;
private String value;
private LocalDateTime createAt;
public OauthAppProperty() {}
public OauthAppProperty(OauthAppProperty value) {
this.id = value.id;
this.oauthAppId = value.oauthAppId;
this.name = value.name;
this.value = value.value;
this.createAt = value.createAt;
}
public OauthAppProperty(
Integer id,
Integer oauthAppId,
String name,
String value,
LocalDateTime createAt
) {
this.id = id;
this.oauthAppId = oauthAppId;
this.name = name;
this.value = value;
this.createAt = createAt;
}
/**
* Getter for <code>databasir.oauth_app_property.id</code>.
*/
public Integer getId() {
return this.id;
}
/**
* Setter for <code>databasir.oauth_app_property.id</code>.
*/
public void setId(Integer id) {
this.id = id;
}
/**
* Getter for <code>databasir.oauth_app_property.oauth_app_id</code>.
* oauth_app.id
*/
public Integer getOauthAppId() {
return this.oauthAppId;
}
/**
* Setter for <code>databasir.oauth_app_property.oauth_app_id</code>.
* oauth_app.id
*/
public void setOauthAppId(Integer oauthAppId) {
this.oauthAppId = oauthAppId;
}
/**
* Getter for <code>databasir.oauth_app_property.name</code>.
*/
public String getName() {
return this.name;
}
/**
* Setter for <code>databasir.oauth_app_property.name</code>.
*/
public void setName(String name) {
this.name = name;
}
/**
* Getter for <code>databasir.oauth_app_property.value</code>.
*/
public String getValue() {
return this.value;
}
/**
* Setter for <code>databasir.oauth_app_property.value</code>.
*/
public void setValue(String value) {
this.value = value;
}
/**
* Getter for <code>databasir.oauth_app_property.create_at</code>.
*/
public LocalDateTime getCreateAt() {
return this.createAt;
}
/**
* Setter for <code>databasir.oauth_app_property.create_at</code>.
*/
public void setCreateAt(LocalDateTime createAt) {
this.createAt = createAt;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("OauthAppProperty (");
sb.append(id);
sb.append(", ").append(oauthAppId);
sb.append(", ").append(name);
sb.append(", ").append(value);
sb.append(", ").append(createAt);
sb.append(")");
return sb.toString();
}
}

View File

@ -0,0 +1,275 @@
/*
* This file is generated by jOOQ.
*/
package com.databasir.dao.tables.records;
import com.databasir.dao.tables.OauthAppPropertyTable;
import com.databasir.dao.tables.pojos.OauthAppProperty;
import java.time.LocalDateTime;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record5;
import org.jooq.Row5;
import org.jooq.impl.UpdatableRecordImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class OauthAppPropertyRecord extends UpdatableRecordImpl<OauthAppPropertyRecord> implements Record5<Integer, Integer, String, String, LocalDateTime> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>databasir.oauth_app_property.id</code>.
*/
public void setId(Integer value) {
set(0, value);
}
/**
* Getter for <code>databasir.oauth_app_property.id</code>.
*/
public Integer getId() {
return (Integer) get(0);
}
/**
* Setter for <code>databasir.oauth_app_property.oauth_app_id</code>.
* oauth_app.id
*/
public void setOauthAppId(Integer value) {
set(1, value);
}
/**
* Getter for <code>databasir.oauth_app_property.oauth_app_id</code>.
* oauth_app.id
*/
public Integer getOauthAppId() {
return (Integer) get(1);
}
/**
* Setter for <code>databasir.oauth_app_property.name</code>.
*/
public void setName(String value) {
set(2, value);
}
/**
* Getter for <code>databasir.oauth_app_property.name</code>.
*/
public String getName() {
return (String) get(2);
}
/**
* Setter for <code>databasir.oauth_app_property.value</code>.
*/
public void setValue(String value) {
set(3, value);
}
/**
* Getter for <code>databasir.oauth_app_property.value</code>.
*/
public String getValue() {
return (String) get(3);
}
/**
* Setter for <code>databasir.oauth_app_property.create_at</code>.
*/
public void setCreateAt(LocalDateTime value) {
set(4, value);
}
/**
* Getter for <code>databasir.oauth_app_property.create_at</code>.
*/
public LocalDateTime getCreateAt() {
return (LocalDateTime) get(4);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<Integer> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Record5 type implementation
// -------------------------------------------------------------------------
@Override
public Row5<Integer, Integer, String, String, LocalDateTime> fieldsRow() {
return (Row5) super.fieldsRow();
}
@Override
public Row5<Integer, Integer, String, String, LocalDateTime> valuesRow() {
return (Row5) super.valuesRow();
}
@Override
public Field<Integer> field1() {
return OauthAppPropertyTable.OAUTH_APP_PROPERTY.ID;
}
@Override
public Field<Integer> field2() {
return OauthAppPropertyTable.OAUTH_APP_PROPERTY.OAUTH_APP_ID;
}
@Override
public Field<String> field3() {
return OauthAppPropertyTable.OAUTH_APP_PROPERTY.NAME;
}
@Override
public Field<String> field4() {
return OauthAppPropertyTable.OAUTH_APP_PROPERTY.VALUE;
}
@Override
public Field<LocalDateTime> field5() {
return OauthAppPropertyTable.OAUTH_APP_PROPERTY.CREATE_AT;
}
@Override
public Integer component1() {
return getId();
}
@Override
public Integer component2() {
return getOauthAppId();
}
@Override
public String component3() {
return getName();
}
@Override
public String component4() {
return getValue();
}
@Override
public LocalDateTime component5() {
return getCreateAt();
}
@Override
public Integer value1() {
return getId();
}
@Override
public Integer value2() {
return getOauthAppId();
}
@Override
public String value3() {
return getName();
}
@Override
public String value4() {
return getValue();
}
@Override
public LocalDateTime value5() {
return getCreateAt();
}
@Override
public OauthAppPropertyRecord value1(Integer value) {
setId(value);
return this;
}
@Override
public OauthAppPropertyRecord value2(Integer value) {
setOauthAppId(value);
return this;
}
@Override
public OauthAppPropertyRecord value3(String value) {
setName(value);
return this;
}
@Override
public OauthAppPropertyRecord value4(String value) {
setValue(value);
return this;
}
@Override
public OauthAppPropertyRecord value5(LocalDateTime value) {
setCreateAt(value);
return this;
}
@Override
public OauthAppPropertyRecord values(Integer value1, Integer value2, String value3, String value4, LocalDateTime value5) {
value1(value1);
value2(value2);
value3(value3);
value4(value4);
value5(value5);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached OauthAppPropertyRecord
*/
public OauthAppPropertyRecord() {
super(OauthAppPropertyTable.OAUTH_APP_PROPERTY);
}
/**
* Create a detached, initialised OauthAppPropertyRecord
*/
public OauthAppPropertyRecord(Integer id, Integer oauthAppId, String name, String value, LocalDateTime createAt) {
super(OauthAppPropertyTable.OAUTH_APP_PROPERTY);
setId(id);
setOauthAppId(oauthAppId);
setName(name);
setValue(value);
setCreateAt(createAt);
}
/**
* Create a detached, initialised OauthAppPropertyRecord
*/
public OauthAppPropertyRecord(OauthAppProperty value) {
super(OauthAppPropertyTable.OAUTH_APP_PROPERTY);
if (value != null) {
setId(value.getId());
setOauthAppId(value.getOauthAppId());
setName(value.getName());
setValue(value.getValue());
setCreateAt(value.getCreateAt());
}
}
}

View File

@ -0,0 +1,10 @@
create table oauth_app_property
(
`id` INT PRIMARY KEY AUTO_INCREMENT,
`oauth_app_id` int not null comment 'oauth_app.id',
`name` text not null,
`value` text not null,
`create_at` TIMESTAMP not null default CURRENT_TIMESTAMP,
INDEX idx_oauth_app_id (oauth_app_id)
) CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci;