Pilot self-bookout

This commit is contained in:
2026-02-20 11:52:43 -05:00
parent 24971ac5fc
commit 7f4e4a8459
14 changed files with 1354 additions and 46 deletions

View File

@@ -6,6 +6,11 @@ from datetime import datetime
Base = declarative_base()
class SubmissionSource(str, Enum):
ADMIN = "ADMIN"
PUBLIC = "PUBLIC"
class DepartureStatus(str, Enum):
BOOKED_OUT = "BOOKED_OUT"
DEPARTED = "DEPARTED"
@@ -27,4 +32,6 @@ class Departure(Base):
etd = Column(DateTime, nullable=True, index=True) # Estimated Time of Departure
departed_dt = Column(DateTime, nullable=True) # Actual departure time
created_by = Column(String(16), nullable=True, index=True)
submitted_via = Column(SQLEnum(SubmissionSource), nullable=False, default=SubmissionSource.ADMIN, index=True)
pilot_email = Column(String(128), nullable=True) # For public submissions
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now(), nullable=False)