oak-general-business/lib/oak-app-domain/OauthUserConnection/Storage.js

57 lines
1.3 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.desc = void 0;
const action_1 = require("oak-domain/lib/actions/action");
exports.desc = {
attributes: {
userId: {
type: "ref",
ref: "user"
},
applicationId: {
notNull: true,
type: "ref",
ref: "application"
},
providerConfigId: {
notNull: true,
type: "ref",
ref: "oauthProviderConfig"
},
providerUserId: {
notNull: true,
type: "varchar",
params: {
length: 128
}
},
rawUserInfo: {
notNull: true,
type: "object"
},
// 令牌
accessToken: {
notNull: true,
type: "varchar",
params: {
length: 256
}
},
refreshToken: {
type: "varchar",
params: {
length: 256
}
},
accessExpiresAt: {
notNull: true,
type: "datetime"
},
refreshExpiresAt: {
type: "datetime"
}
},
actionType: "crud",
actions: action_1.genericActions
};