mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 06:39:01 +02:00
ae6dec9dcb
Revert "[web] Convert models and self-referential test files to ESM " GitOrigin-RevId: 5455cccbb513bd9ca36ce526ff1553065f83d233
33 lines
758 B
JavaScript
33 lines
758 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
|
|
const { Schema } = mongoose
|
|
const { ObjectId } = Schema
|
|
|
|
const OauthAccessTokenSchema = new Schema(
|
|
{
|
|
accessToken: String,
|
|
accessTokenPartial: String,
|
|
type: String,
|
|
accessTokenExpiresAt: Date,
|
|
oauthApplication_id: { type: ObjectId, ref: 'OauthApplication' },
|
|
refreshToken: String,
|
|
refreshTokenExpiresAt: Date,
|
|
scope: String,
|
|
user_id: { type: ObjectId, ref: 'User' },
|
|
createdAt: { type: Date },
|
|
expiresAt: Date,
|
|
lastUsedAt: Date,
|
|
},
|
|
{
|
|
collection: 'oauthAccessTokens',
|
|
minimize: false,
|
|
}
|
|
)
|
|
|
|
exports.OauthAccessToken = mongoose.model(
|
|
'OauthAccessToken',
|
|
OauthAccessTokenSchema
|
|
)
|
|
|
|
exports.OauthAccessTokenSchema = OauthAccessTokenSchema
|