mirror of
https://github.com/vran-dev/databasir.git
synced 2025-10-16 11:49:21 +08:00
support wework oauth login (#267)
* feat: jooq generate oauth_app_property * feat: jooq generate -> remove oauth_app unused columns * feat: support wework oauth login * feat: update oauth property validator
This commit is contained in:
@@ -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,
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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>.
|
||||
*/
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
@@ -19,7 +19,7 @@ import org.jooq.ForeignKey;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Row12;
|
||||
import org.jooq.Row7;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
@@ -76,31 +76,6 @@ public class OauthAppTable extends TableImpl<OauthAppRecord> {
|
||||
*/
|
||||
public final TableField<OauthAppRecord, OAuthAppType> APP_TYPE = createField(DSL.name("app_type"), SQLDataType.VARCHAR(64).nullable(false), this, "github, gitlab", new OAuthAppTypeConverter());
|
||||
|
||||
/**
|
||||
* The column <code>databasir.oauth_app.client_id</code>.
|
||||
*/
|
||||
public final TableField<OauthAppRecord, String> CLIENT_ID = createField(DSL.name("client_id"), SQLDataType.VARCHAR(256), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>databasir.oauth_app.client_secret</code>.
|
||||
*/
|
||||
public final TableField<OauthAppRecord, String> CLIENT_SECRET = createField(DSL.name("client_secret"), SQLDataType.VARCHAR(256), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>databasir.oauth_app.auth_url</code>.
|
||||
*/
|
||||
public final TableField<OauthAppRecord, String> AUTH_URL = createField(DSL.name("auth_url"), SQLDataType.VARCHAR(256), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>databasir.oauth_app.resource_url</code>.
|
||||
*/
|
||||
public final TableField<OauthAppRecord, String> RESOURCE_URL = createField(DSL.name("resource_url"), SQLDataType.VARCHAR(256), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>databasir.oauth_app.scope</code>.
|
||||
*/
|
||||
public final TableField<OauthAppRecord, String> SCOPE = createField(DSL.name("scope"), SQLDataType.VARCHAR(256), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>databasir.oauth_app.update_at</code>.
|
||||
*/
|
||||
@@ -191,11 +166,11 @@ public class OauthAppTable extends TableImpl<OauthAppRecord> {
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row12 type methods
|
||||
// Row7 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row12<Integer, String, String, String, OAuthAppType, String, String, String, String, String, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||
return (Row12) super.fieldsRow();
|
||||
public Row7<Integer, String, String, String, OAuthAppType, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||
return (Row7) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
@@ -23,11 +23,6 @@ public class OauthApp implements Serializable {
|
||||
private String appName;
|
||||
private String appIcon;
|
||||
private OAuthAppType appType;
|
||||
private String clientId;
|
||||
private String clientSecret;
|
||||
private String authUrl;
|
||||
private String resourceUrl;
|
||||
private String scope;
|
||||
private LocalDateTime updateAt;
|
||||
private LocalDateTime createAt;
|
||||
|
||||
@@ -39,11 +34,6 @@ public class OauthApp implements Serializable {
|
||||
this.appName = value.appName;
|
||||
this.appIcon = value.appIcon;
|
||||
this.appType = value.appType;
|
||||
this.clientId = value.clientId;
|
||||
this.clientSecret = value.clientSecret;
|
||||
this.authUrl = value.authUrl;
|
||||
this.resourceUrl = value.resourceUrl;
|
||||
this.scope = value.scope;
|
||||
this.updateAt = value.updateAt;
|
||||
this.createAt = value.createAt;
|
||||
}
|
||||
@@ -54,11 +44,6 @@ public class OauthApp implements Serializable {
|
||||
String appName,
|
||||
String appIcon,
|
||||
OAuthAppType appType,
|
||||
String clientId,
|
||||
String clientSecret,
|
||||
String authUrl,
|
||||
String resourceUrl,
|
||||
String scope,
|
||||
LocalDateTime updateAt,
|
||||
LocalDateTime createAt
|
||||
) {
|
||||
@@ -67,11 +52,6 @@ public class OauthApp implements Serializable {
|
||||
this.appName = appName;
|
||||
this.appIcon = appIcon;
|
||||
this.appType = appType;
|
||||
this.clientId = clientId;
|
||||
this.clientSecret = clientSecret;
|
||||
this.authUrl = authUrl;
|
||||
this.resourceUrl = resourceUrl;
|
||||
this.scope = scope;
|
||||
this.updateAt = updateAt;
|
||||
this.createAt = createAt;
|
||||
}
|
||||
@@ -146,76 +126,6 @@ public class OauthApp implements Serializable {
|
||||
this.appType = appType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.client_id</code>.
|
||||
*/
|
||||
public String getClientId() {
|
||||
return this.clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.client_id</code>.
|
||||
*/
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.client_secret</code>.
|
||||
*/
|
||||
public String getClientSecret() {
|
||||
return this.clientSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.client_secret</code>.
|
||||
*/
|
||||
public void setClientSecret(String clientSecret) {
|
||||
this.clientSecret = clientSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.auth_url</code>.
|
||||
*/
|
||||
public String getAuthUrl() {
|
||||
return this.authUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.auth_url</code>.
|
||||
*/
|
||||
public void setAuthUrl(String authUrl) {
|
||||
this.authUrl = authUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.resource_url</code>.
|
||||
*/
|
||||
public String getResourceUrl() {
|
||||
return this.resourceUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.resource_url</code>.
|
||||
*/
|
||||
public void setResourceUrl(String resourceUrl) {
|
||||
this.resourceUrl = resourceUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.scope</code>.
|
||||
*/
|
||||
public String getScope() {
|
||||
return this.scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.scope</code>.
|
||||
*/
|
||||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.update_at</code>.
|
||||
*/
|
||||
@@ -253,11 +163,6 @@ public class OauthApp implements Serializable {
|
||||
sb.append(", ").append(appName);
|
||||
sb.append(", ").append(appIcon);
|
||||
sb.append(", ").append(appType);
|
||||
sb.append(", ").append(clientId);
|
||||
sb.append(", ").append(clientSecret);
|
||||
sb.append(", ").append(authUrl);
|
||||
sb.append(", ").append(resourceUrl);
|
||||
sb.append(", ").append(scope);
|
||||
sb.append(", ").append(updateAt);
|
||||
sb.append(", ").append(createAt);
|
||||
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
@@ -12,8 +12,8 @@ import java.time.LocalDateTime;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.Record12;
|
||||
import org.jooq.Row12;
|
||||
import org.jooq.Record7;
|
||||
import org.jooq.Row7;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
* oauth app info
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implements Record12<Integer, String, String, String, OAuthAppType, String, String, String, String, String, LocalDateTime, LocalDateTime> {
|
||||
public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implements Record7<Integer, String, String, String, OAuthAppType, LocalDateTime, LocalDateTime> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -95,102 +95,32 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
return (OAuthAppType) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.client_id</code>.
|
||||
*/
|
||||
public void setClientId(String value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.client_id</code>.
|
||||
*/
|
||||
public String getClientId() {
|
||||
return (String) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.client_secret</code>.
|
||||
*/
|
||||
public void setClientSecret(String value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.client_secret</code>.
|
||||
*/
|
||||
public String getClientSecret() {
|
||||
return (String) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.auth_url</code>.
|
||||
*/
|
||||
public void setAuthUrl(String value) {
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.auth_url</code>.
|
||||
*/
|
||||
public String getAuthUrl() {
|
||||
return (String) get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.resource_url</code>.
|
||||
*/
|
||||
public void setResourceUrl(String value) {
|
||||
set(8, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.resource_url</code>.
|
||||
*/
|
||||
public String getResourceUrl() {
|
||||
return (String) get(8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.scope</code>.
|
||||
*/
|
||||
public void setScope(String value) {
|
||||
set(9, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.scope</code>.
|
||||
*/
|
||||
public String getScope() {
|
||||
return (String) get(9);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.update_at</code>.
|
||||
*/
|
||||
public void setUpdateAt(LocalDateTime value) {
|
||||
set(10, value);
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.update_at</code>.
|
||||
*/
|
||||
public LocalDateTime getUpdateAt() {
|
||||
return (LocalDateTime) get(10);
|
||||
return (LocalDateTime) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>databasir.oauth_app.create_at</code>.
|
||||
*/
|
||||
public void setCreateAt(LocalDateTime value) {
|
||||
set(11, value);
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>databasir.oauth_app.create_at</code>.
|
||||
*/
|
||||
public LocalDateTime getCreateAt() {
|
||||
return (LocalDateTime) get(11);
|
||||
return (LocalDateTime) get(6);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -203,17 +133,17 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record12 type implementation
|
||||
// Record7 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row12<Integer, String, String, String, OAuthAppType, String, String, String, String, String, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||
return (Row12) super.fieldsRow();
|
||||
public Row7<Integer, String, String, String, OAuthAppType, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||
return (Row7) super.fieldsRow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row12<Integer, String, String, String, OAuthAppType, String, String, String, String, String, LocalDateTime, LocalDateTime> valuesRow() {
|
||||
return (Row12) super.valuesRow();
|
||||
public Row7<Integer, String, String, String, OAuthAppType, LocalDateTime, LocalDateTime> valuesRow() {
|
||||
return (Row7) super.valuesRow();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -242,37 +172,12 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field6() {
|
||||
return OauthAppTable.OAUTH_APP.CLIENT_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field7() {
|
||||
return OauthAppTable.OAUTH_APP.CLIENT_SECRET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field8() {
|
||||
return OauthAppTable.OAUTH_APP.AUTH_URL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field9() {
|
||||
return OauthAppTable.OAUTH_APP.RESOURCE_URL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field10() {
|
||||
return OauthAppTable.OAUTH_APP.SCOPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<LocalDateTime> field11() {
|
||||
public Field<LocalDateTime> field6() {
|
||||
return OauthAppTable.OAUTH_APP.UPDATE_AT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<LocalDateTime> field12() {
|
||||
public Field<LocalDateTime> field7() {
|
||||
return OauthAppTable.OAUTH_APP.CREATE_AT;
|
||||
}
|
||||
|
||||
@@ -302,37 +207,12 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component6() {
|
||||
return getClientId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component7() {
|
||||
return getClientSecret();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component8() {
|
||||
return getAuthUrl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component9() {
|
||||
return getResourceUrl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component10() {
|
||||
return getScope();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime component11() {
|
||||
public LocalDateTime component6() {
|
||||
return getUpdateAt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime component12() {
|
||||
public LocalDateTime component7() {
|
||||
return getCreateAt();
|
||||
}
|
||||
|
||||
@@ -362,37 +242,12 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value6() {
|
||||
return getClientId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value7() {
|
||||
return getClientSecret();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value8() {
|
||||
return getAuthUrl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value9() {
|
||||
return getResourceUrl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value10() {
|
||||
return getScope();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime value11() {
|
||||
public LocalDateTime value6() {
|
||||
return getUpdateAt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime value12() {
|
||||
public LocalDateTime value7() {
|
||||
return getCreateAt();
|
||||
}
|
||||
|
||||
@@ -427,49 +282,19 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord value6(String value) {
|
||||
setClientId(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord value7(String value) {
|
||||
setClientSecret(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord value8(String value) {
|
||||
setAuthUrl(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord value9(String value) {
|
||||
setResourceUrl(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord value10(String value) {
|
||||
setScope(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord value11(LocalDateTime value) {
|
||||
public OauthAppRecord value6(LocalDateTime value) {
|
||||
setUpdateAt(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord value12(LocalDateTime value) {
|
||||
public OauthAppRecord value7(LocalDateTime value) {
|
||||
setCreateAt(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OauthAppRecord values(Integer value1, String value2, String value3, String value4, OAuthAppType value5, String value6, String value7, String value8, String value9, String value10, LocalDateTime value11, LocalDateTime value12) {
|
||||
public OauthAppRecord values(Integer value1, String value2, String value3, String value4, OAuthAppType value5, LocalDateTime value6, LocalDateTime value7) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
@@ -477,11 +302,6 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
value7(value7);
|
||||
value8(value8);
|
||||
value9(value9);
|
||||
value10(value10);
|
||||
value11(value11);
|
||||
value12(value12);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -499,7 +319,7 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
/**
|
||||
* Create a detached, initialised OauthAppRecord
|
||||
*/
|
||||
public OauthAppRecord(Integer id, String registrationId, String appName, String appIcon, OAuthAppType appType, String clientId, String clientSecret, String authUrl, String resourceUrl, String scope, LocalDateTime updateAt, LocalDateTime createAt) {
|
||||
public OauthAppRecord(Integer id, String registrationId, String appName, String appIcon, OAuthAppType appType, LocalDateTime updateAt, LocalDateTime createAt) {
|
||||
super(OauthAppTable.OAUTH_APP);
|
||||
|
||||
setId(id);
|
||||
@@ -507,11 +327,6 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
setAppName(appName);
|
||||
setAppIcon(appIcon);
|
||||
setAppType(appType);
|
||||
setClientId(clientId);
|
||||
setClientSecret(clientSecret);
|
||||
setAuthUrl(authUrl);
|
||||
setResourceUrl(resourceUrl);
|
||||
setScope(scope);
|
||||
setUpdateAt(updateAt);
|
||||
setCreateAt(createAt);
|
||||
}
|
||||
@@ -528,11 +343,6 @@ public class OauthAppRecord extends UpdatableRecordImpl<OauthAppRecord> implemen
|
||||
setAppName(value.getAppName());
|
||||
setAppIcon(value.getAppIcon());
|
||||
setAppType(value.getAppType());
|
||||
setClientId(value.getClientId());
|
||||
setClientSecret(value.getClientSecret());
|
||||
setAuthUrl(value.getAuthUrl());
|
||||
setResourceUrl(value.getResourceUrl());
|
||||
setScope(value.getScope());
|
||||
setUpdateAt(value.getUpdateAt());
|
||||
setCreateAt(value.getCreateAt());
|
||||
}
|
||||
|
@@ -1,8 +1,15 @@
|
||||
package com.databasir.dao.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
public enum OAuthAppType {
|
||||
|
||||
GITHUB, GITLAB;
|
||||
GITHUB("github"), GITLAB("gitlab"), WE_WORK("企业微信");
|
||||
|
||||
@Getter
|
||||
private String description;
|
||||
|
||||
public boolean isSame(String type) {
|
||||
return this.name().equalsIgnoreCase(type);
|
||||
|
@@ -0,0 +1,37 @@
|
||||
package com.databasir.dao.impl;
|
||||
|
||||
import com.databasir.dao.tables.pojos.OauthAppProperty;
|
||||
import lombok.Getter;
|
||||
import org.jooq.DSLContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.databasir.dao.Tables.OAUTH_APP_PROPERTY;
|
||||
|
||||
@Repository
|
||||
public class OauthAppPropertyDao extends BaseDao<OauthAppProperty> {
|
||||
|
||||
@Autowired
|
||||
@Getter
|
||||
private DSLContext dslContext;
|
||||
|
||||
public OauthAppPropertyDao() {
|
||||
super(OAUTH_APP_PROPERTY, OauthAppProperty.class);
|
||||
}
|
||||
|
||||
public int deleteByOauthAppId(Integer oauthAppId) {
|
||||
return this.getDslContext()
|
||||
.deleteFrom(OAUTH_APP_PROPERTY)
|
||||
.where(OAUTH_APP_PROPERTY.OAUTH_APP_ID.eq(oauthAppId))
|
||||
.execute();
|
||||
}
|
||||
|
||||
public List<OauthAppProperty> selectByOauthAppId(Integer oauthAppID) {
|
||||
return this.getDslContext()
|
||||
.select(OAUTH_APP_PROPERTY.fields())
|
||||
.from(OAUTH_APP_PROPERTY).where(OAUTH_APP_PROPERTY.OAUTH_APP_ID.eq(oauthAppID))
|
||||
.fetchInto(OauthAppProperty.class);
|
||||
}
|
||||
}
|
10
dao/src/main/resources/db/migration/V1.4.5__oauth_prop.sql
Normal file
10
dao/src/main/resources/db/migration/V1.4.5__oauth_prop.sql
Normal 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;
|
@@ -0,0 +1,30 @@
|
||||
insert into oauth_app_property (oauth_app_id, name, value)
|
||||
select id, 'auth_host', auth_url
|
||||
from oauth_app
|
||||
where auth_url is not null;
|
||||
|
||||
insert into oauth_app_property (oauth_app_id, name, value)
|
||||
select id, 'resource_host', resource_url
|
||||
from oauth_app
|
||||
where resource_url is not null;
|
||||
|
||||
insert into oauth_app_property (oauth_app_id, name, value)
|
||||
select id, 'client_id', client_id
|
||||
from oauth_app
|
||||
where client_id is not null;
|
||||
|
||||
insert into oauth_app_property (oauth_app_id, name, value)
|
||||
select id, 'client_secret', client_secret
|
||||
from oauth_app
|
||||
where client_secret is not null;
|
||||
|
||||
alter table oauth_app
|
||||
drop column auth_url;
|
||||
alter table oauth_app
|
||||
drop column resource_url;
|
||||
alter table oauth_app
|
||||
drop column client_id;
|
||||
alter table oauth_app
|
||||
drop column client_secret;
|
||||
alter table oauth_app
|
||||
drop column scope;
|
Reference in New Issue
Block a user