define the controller and service for the airport management
This commit is contained in:
		
							
								
								
									
										42
									
								
								src/airport/models/airport.model.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								src/airport/models/airport.model.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | ||||
| 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'; | ||||
|  | ||||
| export type AirportDocument = Airport & Document; | ||||
|  | ||||
| @Schema() | ||||
| export class Airport { | ||||
|   @Prop({ | ||||
|     required: true, | ||||
|     type: String, | ||||
|   }) | ||||
|   icao: string; | ||||
|  | ||||
|   @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); | ||||
		Reference in New Issue
	
	Block a user