54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
import { genericActions as actions } from "oak-domain/lib/actions/action";
|
|
export const 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
|
|
};
|