47 lines
1.0 KiB
JavaScript
47 lines
1.0 KiB
JavaScript
import { genericActions as actions } from "oak-domain/lib/actions/action";
|
|
export const desc = {
|
|
attributes: {
|
|
accessToken: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 1024
|
|
}
|
|
},
|
|
refreshToken: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 1024
|
|
}
|
|
},
|
|
userId: {
|
|
notNull: true,
|
|
type: "ref",
|
|
ref: "user"
|
|
},
|
|
codeId: {
|
|
notNull: true,
|
|
type: "ref",
|
|
ref: "oauthAuthorizationCode"
|
|
},
|
|
accessExpiresAt: {
|
|
notNull: true,
|
|
type: "datetime"
|
|
},
|
|
refreshExpiresAt: {
|
|
notNull: true,
|
|
type: "datetime"
|
|
},
|
|
revokedAt: {
|
|
type: "datetime"
|
|
},
|
|
// 审计相关,需要手动更新
|
|
lastUsedAt: {
|
|
type: "datetime"
|
|
}
|
|
},
|
|
actionType: "crud",
|
|
actions
|
|
};
|