jonathanjordan21 commited on
Commit
1bb617d
·
verified ·
1 Parent(s): 9654c6b

Rename garuda/models/flight_model.py to garuda/models/flight_models.py

Browse files
garuda/models/flight_model.py DELETED
File without changes
garuda/models/flight_models.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel
2
+ from datetime import datetime
3
+ from typing import Literal
4
+
5
+
6
+ # ======================
7
+ # FLIGHT
8
+ # ======================
9
+ class Flight(BaseModel):
10
+ flight_id: str
11
+ airline: str
12
+ origin: str
13
+ destination: str
14
+ departure_time: datetime
15
+ arrival_time: datetime
16
+ duration_minutes: int
17
+ seat_class: Literal["FIRST", "BUSINESS", "ECONOMY"]
18
+ price: float
19
+
20
+
21
+ # ======================
22
+ # BOOKING
23
+ # ======================
24
+ class BookingRequest(BaseModel):
25
+ customer_name: str
26
+ flight_id: str
27
+
28
+
29
+ # ======================
30
+ # REFUND
31
+ # ======================
32
+ class RefundRequest(BaseModel):
33
+ booking_id: str
34
+
35
+
36
+ # ======================
37
+ # RESCHEDULE
38
+ # ======================
39
+ class RescheduleRequest(BaseModel):
40
+ booking_id: str
41
+ new_flight_id: str