import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; export type UserDocument = User & Document; @Schema() export class User { @Prop({ required: true, index: true, type: String, }) vatsimId: string; @Prop({ type: String, }) fullName: string; @Prop({ required: true, type: String, }) vatsimToken: string; @Prop({ type: String, }) vatsimRefreshToken: string; @Prop({ type: Boolean, default: false, }) administrator: boolean; @Prop({ type: [String], default: [], }) airportConfigurationAccess: string[]; } export const UserSchema = SchemaFactory.createForClass(User);