Files
aman-backend/src/performance/models/performance.model.ts
2022-10-22 21:41:38 +02:00

44 líneas
832 B
TypeScript

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);