28 lines
568 B
TypeScript
28 lines
568 B
TypeScript
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
import { Document } from 'mongoose';
|
|
import { Constraint, ConstraintSchema } from './constraint.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({
|
|
type: [ConstraintSchema],
|
|
})
|
|
constraints: Constraint[];
|
|
}
|
|
|
|
export const ArrivalRouteSchema = SchemaFactory.createForClass(ArrivalRoute);
|