35 lines
729 B
TypeScript
35 lines
729 B
TypeScript
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
import { Document } from 'mongoose';
|
|
import { Constraint, ConstraintSchema } from './constraint.model';
|
|
import { Waypoint, WaypointSchema } from '../../models/waypoint.model';
|
|
|
|
export type ArrivalRouteDocument = ArrivalRoute & Document;
|
|
|
|
@Schema()
|
|
export class ArrivalRoute {
|
|
@Prop({
|
|
required: true,
|
|
type: String,
|
|
})
|
|
arrival: string;
|
|
|
|
@Prop({
|
|
required: true,
|
|
type: String,
|
|
})
|
|
runway: string;
|
|
|
|
@Prop({
|
|
required: true,
|
|
type: [WaypointSchema],
|
|
})
|
|
waypoints: Waypoint[];
|
|
|
|
@Prop({
|
|
type: [ConstraintSchema],
|
|
})
|
|
constraints: Constraint[];
|
|
}
|
|
|
|
export const ArrivalRouteSchema = SchemaFactory.createForClass(ArrivalRoute);
|