1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
- import { Document } from 'mongoose';
- import { ArrivalRoute, ArrivalRouteSchema } from './arrivalroute.model';
- import { Constraint, ConstraintSchema } from './constraint.model';
- import { Planning, PlanningSchema } from './planning.model';
- import { RunwaySpacing, RunwaySpacingSchema } from './runwayspacing.model';
- import { Waypoint } from '../../models/waypoint.model';
- export type AirportDocument = Airport & Document;
- @Schema()
- export class Airport {
- @Prop({
- required: true,
- index: true,
- type: String,
- })
- icao: string;
- @Prop({
- required: true,
- type: Waypoint,
- })
- location: Waypoint;
- @Prop({
- required: true,
- type: Number,
- })
- elevation: number;
- @Prop({
- type: [ConstraintSchema],
- })
- upperConstraints: Constraint[];
- @Prop({
- required: true,
- type: [ArrivalRouteSchema],
- })
- arrivalRoutes: ArrivalRoute[];
- @Prop({
- required: true,
- type: [RunwaySpacingSchema],
- })
- spacings: RunwaySpacing[];
- @Prop({
- required: true,
- type: PlanningSchema,
- })
- planning: Planning;
- }
- export const AirportSchema = SchemaFactory.createForClass(Airport);
|