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

43 lines
746 B
TypeScript

import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';
export type AircraftDocument = Aircraft & Document;
@Schema()
export class Aircraft {
@Prop({
required: true,
type: String,
})
type: string;
@Prop({
required: true,
type: String,
enum: ['L', 'M', 'H', 'S'],
})
wtc: string;
@Prop({
required: true,
type: String,
enum: ['A', 'B', 'C', 'D', 'E', 'F'],
})
wakeRecat: string;
@Prop({
required: true,
type: Number,
})
engineCount: number;
@Prop({
required: true,
type: String,
enum: ['ELECTRIC', 'TURBOPROP', 'JET'],
})
engineType: string;
}
export const AircraftSchema = SchemaFactory.createForClass(Aircraft);