| 1 | import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; |
| 2 | import { |
| 3 | BookingReason, |
| 4 | SeatType, |
| 5 | SeatingClass, |
| 6 | } from '@prisma/client'; |
| 7 | |
| 8 | export class FlightBookingEntity |
| 9 | @ApiProperty({ |
| 10 | description: 'Unique booking identifier', |
| 11 | example: 'booking_abc123', |
| 12 | }) |
| 13 | id: string; |
| 14 | |
| 15 | @ApiPropertyOptional({ |
| 16 | description: 'Booking code/confirmation code (e.g., "ABC123")', |
| 17 | example: 'ABC123', |
| 18 | }) |
| 19 | bookingCode?: string |
| 20 | |
| 21 | @ApiPropertyOptional({ |
| 22 | description: 'Seat number (e.g., "12A", "1F")', |
| 23 | example: '12A', |
| 24 | }) |
| 25 | seatNumber?: string |
| 26 | |
| 27 | @ApiPropertyOptional({ |
| 28 | description: 'Type of seat position', |
| 29 | enum: SeatType, |
| 30 | example: SeatType.window |
| 31 | }) |
| 32 | seatType?: SeatType |
| 33 | |
| 34 | @ApiPropertyOptional({ |
| 35 | description: 'Class of service', |
| 36 | enum: SeatingClass, |
| 37 | example: SeatingClass.economy |
| 38 | }) |
| 39 | seatingClass?: SeatingClass |
| 40 | |
| 41 | @ApiPropertyOptional({ |
| 42 | description: 'Reason for the flight', |
| 43 | enum: BookingReason, |
| 44 | example: BookingReason.personal |
| 45 | }) |
| 46 | reason?: BookingReason |
| 47 | |
| 48 | @ApiPropertyOptional({ |
| 49 | description: 'Additional notes about the booking', |
| 50 | example: 'Window seat preferred', |
| 51 | }) |
| 52 | notes?: string |
| 53 | |
| 54 | @ApiProperty({ |
| 55 | description: 'Flight ID associated with this booking', |
| 56 | example: 'flight_abc123', |
| 57 | }) |
| 58 | flightId: string; |
| 59 | |
| 60 | @ApiProperty({ |
| 61 | description: 'User ID who owns this booking', |
| 62 | example: 'user_abc123', |
| 63 | }) |
| 64 | userId: string; |
| 65 | |
| 66 | @ApiProperty({ |
| 67 | description: 'Date and time when the booking was created', |
| 68 | example: '2024-03-20T10:00:00Z', |
| 69 | }) |
| 70 | createdAt: Date |
| 71 | |
| 72 | @ApiProperty({ |
| 73 | description: 'Date and time when the booking was last updated', |
| 74 | example: '2024-03-20T10:00:00Z', |
| 75 | }) |
| 76 | updatedAt: Date |
| 77 | } |
| 78 | |