| 1234567891011121314151617181920212223242526 |
- const mongoose = require('../infrastructure/Mongoose')
- const { Schema } = mongoose
- const { ObjectId } = Schema
- const OauthAuthorizationCodeSchema = new Schema(
- {
- authorizationCode: String,
- expiresAt: Date,
- oauthApplication_id: { type: ObjectId, ref: 'OauthApplication' },
- redirectUri: String,
- scope: String,
- user_id: { type: ObjectId, ref: 'User' },
- },
- {
- collection: 'oauthAuthorizationCodes',
- minimize: false,
- }
- )
- exports.OauthAuthorizationCode = mongoose.model(
- 'OauthAuthorizationCode',
- OauthAuthorizationCodeSchema
- )
- exports.OauthAuthorizationCodeSchema = OauthAuthorizationCodeSchema
|