forked from Chatbot/v3-api
first commit v3 initialiazed a temporary repository for darmanet client
This commit is contained in:
42
src/database/model/externalTokens.model.ts
Normal file
42
src/database/model/externalTokens.model.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
||||
|
||||
@Schema({
|
||||
timestamps: { createdAt: 'createdAt', updatedAt: 'updatedAt' },
|
||||
versionKey: false,
|
||||
collection: 'externalTokens',
|
||||
_id: true,
|
||||
})
|
||||
export class ExternalTokensModel {
|
||||
@Prop({ type: String })
|
||||
token: string;
|
||||
|
||||
@Prop({ type: 'string' })
|
||||
url: string;
|
||||
|
||||
@Prop({ type: Boolean })
|
||||
isActive: boolean;
|
||||
|
||||
@Prop({ type: String })
|
||||
method: 'access' | 'refresh';
|
||||
|
||||
@Prop({ type: String })
|
||||
tokenType: 'Bearer' | 'Basic';
|
||||
|
||||
@Prop({ type: String })
|
||||
expiresIn: string;
|
||||
|
||||
@Prop({ type: String })
|
||||
scope: string;
|
||||
|
||||
@Prop({ type: Number })
|
||||
timestamps: Number;
|
||||
|
||||
@Prop({ type: Array })
|
||||
createdAt: [];
|
||||
|
||||
@Prop({ type: Array })
|
||||
updatedAt: [];
|
||||
}
|
||||
|
||||
export const ExternalTokenSchema =
|
||||
SchemaFactory.createForClass(ExternalTokensModel);
|
||||
Reference in New Issue
Block a user