forked from Shared/esg
initial commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
||||
import { HydratedDocument } from 'mongoose';
|
||||
|
||||
export type GeneralTokenDocument = HydratedDocument<GeneralToken>;
|
||||
|
||||
@Schema({ timestamps: { createdAt: true, updatedAt: false }, collection: 'general_tokens' })
|
||||
export class GeneralToken {
|
||||
@Prop({ required: true })
|
||||
serviceProvider!: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
tokenType!: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
url!: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
clientId!: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
clientSecret!: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
username!: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
scope!: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
accessToken!: string;
|
||||
|
||||
@Prop()
|
||||
refreshToken?: string;
|
||||
|
||||
@Prop({ required: true })
|
||||
expiresIn!: number;
|
||||
|
||||
@Prop({ required: true })
|
||||
expiresAt!: Date;
|
||||
|
||||
createdAt?: Date;
|
||||
}
|
||||
|
||||
export const GeneralTokenSchema = SchemaFactory.createForClass(GeneralToken);
|
||||
Reference in New Issue
Block a user