mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 22:29:01 +02:00
bdc5360bc0
Use the default Mongoose connection pool for all models GitOrigin-RevId: d227b7eb36f130085c9eb1480dc07bd50ba57768
27 lines
611 B
JavaScript
27 lines
611 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
|
|
const { Schema } = mongoose
|
|
const { ObjectId } = Schema
|
|
|
|
const OauthAccessTokenSchema = new Schema(
|
|
{
|
|
accessToken: String,
|
|
accessTokenExpiresAt: Date,
|
|
oauthApplication_id: { type: ObjectId, ref: 'OauthApplication' },
|
|
refreshToken: String,
|
|
refreshTokenExpiresAt: Date,
|
|
scope: String,
|
|
user_id: { type: ObjectId, ref: 'User' }
|
|
},
|
|
{
|
|
collection: 'oauthAccessTokens'
|
|
}
|
|
)
|
|
|
|
exports.OauthAccessToken = mongoose.model(
|
|
'OauthAccessToken',
|
|
OauthAccessTokenSchema
|
|
)
|
|
|
|
exports.OauthAccessTokenSchema = OauthAccessTokenSchema
|