import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; import { PerformanceEntry, PerformanceEntrySchema, } from './performanceentry.model'; export type PerformanceDocument = Performance & Document; @Schema() export class Performance { @Prop({ type: String, required: true, }) icaoCode: string; @Prop({ required: true, type: PerformanceEntrySchema, }) aboveFL240: PerformanceEntry; @Prop({ required: true, type: PerformanceEntrySchema, }) aboveFL100: PerformanceEntry; @Prop({ required: true, type: PerformanceEntrySchema, }) belowFL100: PerformanceEntry; @Prop({ required: true, type: Number, }) minimalApproachSpeed: number; } export const PerformanceSchema = SchemaFactory.createForClass(Performance);