Files
aman-backend/src/inbound/models/planning.model.ts

38 lines
698 B
TypeScript

import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';
import {
PredictedWaypoint,
PredictedWaypointSchema,
} from './predictedwaypoint.model';
export type PlanningDocument = Planning & Document;
@Schema()
export class Planning {
@Prop({
required: true,
type: String,
})
arrivalRoute: string;
@Prop({
required: true,
type: String,
})
arrivalRunway: string;
@Prop({
required: true,
type: [PredictedWaypointSchema],
})
plannedRoute: PredictedWaypoint[];
@Prop({
required: true,
type: Boolean,
})
fixedPlan: boolean;
}
export const PlanningSchema = SchemaFactory.createForClass(Planning);