{
  "$schema": "mantara.schema.v1",
  "system_name": "Nepal Airline Management System",
  "schema_name": "ai_sch_20260512_075029",
  "description": "A system to manage domestic flight operations for airlines in Nepal, focusing on aircraft, flight schedules, routes, bookings, and passenger information.",
  "menus": [
    {
      "menu_id": 1,
      "menu_name": "Aircraft Management",
      "sequence_number": 1,
      "description": "Manage aircraft fleet, including adding, editing, and deactivating aircraft.",
      "submenus": [
        {
          "submenu_id": 101,
          "submenu_name": "Aircraft List",
          "sequence_number": 1,
          "description": "View and manage the list of aircraft in the fleet.",
          "tables": [
            {
              "table_name": "aircraft",
              "comment": "Stores information about aircraft in the fleet, including registration details and capacity.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 101 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "registration_number",
                  "type": "VARCHAR(20)",
                  "constraints": "NOT NULL UNIQUE",
                  "comment": "Unique registration number of the aircraft."
                },
                {
                  "name": "model",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL",
                  "comment": "Model of the aircraft."
                },
                {
                  "name": "manufacturer",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL",
                  "comment": "Manufacturer of the aircraft."
                },
                {
                  "name": "total_seats",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (total_seats > 0)",
                  "comment": "Total number of seats in the aircraft."
                },
                {
                  "name": "economy_seats",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (economy_seats >= 0)",
                  "comment": "Number of economy class seats."
                },
                {
                  "name": "business_seats",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (business_seats >= 0)",
                  "comment": "Number of business class seats."
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('active', 'maintenance', 'retired'))",
                  "comment": "Operational status of the aircraft."
                },
                {
                  "name": "year_manufactured",
                  "type": "INTEGER",
                  "comment": "Year the aircraft was manufactured."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 2,
      "menu_name": "Airport Management",
      "sequence_number": 2,
      "description": "Manage information about Nepal's domestic airports.",
      "submenus": [
        {
          "submenu_id": 201,
          "submenu_name": "Airport List",
          "sequence_number": 1,
          "description": "View and manage the list of airports.",
          "tables": [
            {
              "table_name": "airports",
              "comment": "Stores information about domestic airports in Nepal, including codes and locations.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 201 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "code",
                  "type": "VARCHAR(10)",
                  "constraints": "NOT NULL UNIQUE",
                  "comment": "Unique IATA code for the airport."
                },
                {
                  "name": "name",
                  "type": "VARCHAR(200)",
                  "constraints": "NOT NULL",
                  "comment": "Name of the airport."
                },
                {
                  "name": "city",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL",
                  "comment": "City where the airport is located."
                },
                {
                  "name": "district",
                  "type": "VARCHAR(100)",
                  "comment": "District where the airport is located."
                },
                {
                  "name": "elevation_feet",
                  "type": "INTEGER",
                  "comment": "Elevation of the airport in feet."
                },
                {
                  "name": "latitude",
                  "type": "DECIMAL(10, 7)",
                  "comment": "Latitude of the airport location."
                },
                {
                  "name": "longitude",
                  "type": "DECIMAL(10, 7)",
                  "comment": "Longitude of the airport location."
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('operational', 'closed', 'limited'))",
                  "comment": "Operational status of the airport."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 3,
      "menu_name": "Route Management",
      "sequence_number": 3,
      "description": "Manage flight routes between airports.",
      "submenus": [
        {
          "submenu_id": 301,
          "submenu_name": "Route List",
          "sequence_number": 1,
          "description": "View and manage flight routes.",
          "tables": [
            {
              "table_name": "routes",
              "comment": "Stores information about flight routes between airports, including distance and duration.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 301 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "origin_airport_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.airports(id) ON DELETE RESTRICT",
                  "comment": "Origin airport for the route."
                },
                {
                  "name": "destination_airport_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.airports(id) ON DELETE RESTRICT",
                  "comment": "Destination airport for the route."
                },
                {
                  "name": "distance_km",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (distance_km > 0)",
                  "comment": "Distance of the route in kilometers."
                },
                {
                  "name": "estimated_duration_minutes",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (estimated_duration_minutes > 0)",
                  "comment": "Estimated flight duration in minutes."
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('active', 'inactive', 'seasonal'))",
                  "comment": "Operational status of the route."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 4,
      "menu_name": "Flight Schedule Management",
      "sequence_number": 4,
      "description": "Manage flight schedules, including creation and modification of schedules.",
      "submenus": [
        {
          "submenu_id": 401,
          "submenu_name": "Flight Schedule List",
          "sequence_number": 1,
          "description": "View and manage flight schedules.",
          "tables": [
            {
              "table_name": "flight_schedules",
              "comment": "Stores information about flight schedules, including route, aircraft, and timing details.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 401 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "route_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.routes(id) ON DELETE RESTRICT",
                  "comment": "Route for the flight schedule."
                },
                {
                  "name": "aircraft_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.aircraft(id) ON DELETE RESTRICT",
                  "comment": "Aircraft assigned to the flight schedule."
                },
                {
                  "name": "flight_number",
                  "type": "VARCHAR(20)",
                  "constraints": "NOT NULL",
                  "comment": "Unique flight number for the schedule."
                },
                {
                  "name": "departure_time",
                  "type": "TIME",
                  "constraints": "NOT NULL",
                  "comment": "Scheduled departure time."
                },
                {
                  "name": "arrival_time",
                  "type": "TIME",
                  "constraints": "NOT NULL",
                  "comment": "Scheduled arrival time."
                },
                {
                  "name": "recurrence_pattern",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (recurrence_pattern IN ('daily', 'weekly', 'one_time'))",
                  "comment": "Recurrence pattern for the schedule."
                },
                {
                  "name": "days_of_week",
                  "type": "VARCHAR(50)",
                  "comment": "Days of the week for recurring schedules."
                },
                {
                  "name": "effective_from",
                  "type": "DATE",
                  "constraints": "NOT NULL",
                  "comment": "Start date for the schedule's effectiveness."
                },
                {
                  "name": "effective_to",
                  "type": "DATE",
                  "constraints": "NOT NULL",
                  "comment": "End date for the schedule's effectiveness."
                },
                {
                  "name": "economy_price",
                  "type": "DECIMAL(10, 2)",
                  "constraints": "NOT NULL CHECK (economy_price >= 0)",
                  "comment": "Price for economy class seats."
                },
                {
                  "name": "business_price",
                  "type": "DECIMAL(10, 2)",
                  "constraints": "NOT NULL CHECK (business_price >= 0)",
                  "comment": "Price for business class seats."
                },
                {
                  "name": "economy_seats_available",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (economy_seats_available >= 0)",
                  "comment": "Number of available economy class seats."
                },
                {
                  "name": "business_seats_available",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (business_seats_available >= 0)",
                  "comment": "Number of available business class seats."
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('active', 'inactive', 'cancelled'))",
                  "comment": "Operational status of the flight schedule."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 5,
      "menu_name": "Flight Instance Management",
      "sequence_number": 5,
      "description": "Manage specific occurrences of flight schedules, including real-time status updates.",
      "submenus": [
        {
          "submenu_id": 501,
          "submenu_name": "Flight Instance List",
          "sequence_number": 1,
          "description": "View and manage flight instances.",
          "tables": [
            {
              "table_name": "flight_instances",
              "comment": "Stores information about specific occurrences of flight schedules, including real-time status.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 501 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "flight_schedule_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.flight_schedules(id) ON DELETE CASCADE",
                  "comment": "Flight schedule to which this instance belongs."
                },
                {
                  "name": "aircraft_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.aircraft(id) ON DELETE RESTRICT",
                  "comment": "Aircraft operating this flight instance."
                },
                {
                  "name": "flight_date",
                  "type": "DATE",
                  "constraints": "NOT NULL",
                  "comment": "Date of the flight instance."
                },
                {
                  "name": "scheduled_departure",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL",
                  "comment": "Scheduled departure timestamp."
                },
                {
                  "name": "scheduled_arrival",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL",
                  "comment": "Scheduled arrival timestamp."
                },
                {
                  "name": "actual_departure",
                  "type": "TIMESTAMP",
                  "comment": "Actual departure timestamp."
                },
                {
                  "name": "actual_arrival",
                  "type": "TIMESTAMP",
                  "comment": "Actual arrival timestamp."
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('scheduled', 'boarding', 'departed', 'arrived', 'delayed', 'cancelled'))",
                  "comment": "Current status of the flight instance."
                },
                {
                  "name": "delay_minutes",
                  "type": "INTEGER",
                  "constraints": "DEFAULT 0",
                  "comment": "Total delay in minutes."
                },
                {
                  "name": "gate_number",
                  "type": "VARCHAR(10)",
                  "comment": "Assigned gate number for the flight."
                },
                {
                  "name": "economy_seats_booked",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 0",
                  "comment": "Number of economy seats booked."
                },
                {
                  "name": "business_seats_booked",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 0",
                  "comment": "Number of business seats booked."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 6,
      "menu_name": "Booking Management",
      "sequence_number": 6,
      "description": "Manage bookings, including creation, modification, and cancellation of bookings.",
      "submenus": [
        {
          "submenu_id": 601,
          "submenu_name": "Booking List",
          "sequence_number": 1,
          "description": "View and manage bookings.",
          "tables": [
            {
              "table_name": "bookings",
              "comment": "Stores information about bookings, including passenger details and payment status.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 601 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "booking_reference",
                  "type": "VARCHAR(20)",
                  "constraints": "NOT NULL UNIQUE",
                  "comment": "Unique reference number for the booking."
                },
                {
                  "name": "flight_instance_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.flight_instances(id) ON DELETE RESTRICT",
                  "comment": "Flight instance associated with the booking."
                },
                {
                  "name": "pricing_tier_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.pricing_tiers(id) ON DELETE RESTRICT",
                  "comment": "Pricing tier selected for the booking."
                },
                {
                  "name": "booking_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP",
                  "comment": "Date and time when the booking was made."
                },
                {
                  "name": "total_passengers",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (total_passengers > 0)",
                  "comment": "Total number of passengers in the booking."
                },
                {
                  "name": "total_amount",
                  "type": "DECIMAL(10, 2)",
                  "constraints": "NOT NULL CHECK (total_amount >= 0)",
                  "comment": "Total amount for the booking."
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('confirmed', 'pending', 'cancelled', 'completed'))",
                  "comment": "Current status of the booking."
                },
                {
                  "name": "booked_by",
                  "type": "VARCHAR(200)",
                  "comment": "Name of the person who made the booking."
                },
                {
                  "name": "cancellation_date",
                  "type": "TIMESTAMP",
                  "comment": "Date and time when the booking was cancelled."
                },
                {
                  "name": "cancellation_reason",
                  "type": "TEXT",
                  "comment": "Reason for booking cancellation."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 7,
      "menu_name": "Passenger Management",
      "sequence_number": 7,
      "description": "Manage passenger information, including personal details and booking history.",
      "submenus": [
        {
          "submenu_id": 701,
          "submenu_name": "Passenger List",
          "sequence_number": 1,
          "description": "View and manage passenger details.",
          "tables": [
            {
              "table_name": "passengers",
              "comment": "Stores information about passengers, including personal details and contact information.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 701 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "first_name",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL",
                  "comment": "First name of the passenger."
                },
                {
                  "name": "last_name",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL",
                  "comment": "Last name of the passenger."
                },
                {
                  "name": "date_of_birth",
                  "type": "DATE",
                  "comment": "Date of birth of the passenger."
                },
                {
                  "name": "gender",
                  "type": "VARCHAR(20)",
                  "constraints": "CHECK (gender IN ('male', 'female', 'other'))",
                  "comment": "Gender of the passenger."
                },
                {
                  "name": "nationality",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL DEFAULT 'Nepali'",
                  "comment": "Nationality of the passenger."
                },
                {
                  "name": "id_type",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (id_type IN ('passport', 'citizenship', 'driving_license'))",
                  "comment": "Type of identification document."
                },
                {
                  "name": "id_number",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL",
                  "comment": "Identification number of the passenger."
                },
                {
                  "name": "email",
                  "type": "VARCHAR(255)",
                  "comment": "Email address of the passenger."
                },
                {
                  "name": "phone",
                  "type": "VARCHAR(20)",
                  "constraints": "NOT NULL",
                  "comment": "Contact phone number of the passenger."
                },
                {
                  "name": "emergency_contact_name",
                  "type": "VARCHAR(200)",
                  "comment": "Name of the emergency contact person."
                },
                {
                  "name": "emergency_contact_phone",
                  "type": "VARCHAR(20)",
                  "comment": "Phone number of the emergency contact person."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 8,
      "menu_name": "Seat Assignment Management",
      "sequence_number": 8,
      "description": "Manage seat assignments for passengers on flight instances.",
      "submenus": [
        {
          "submenu_id": 801,
          "submenu_name": "Seat Assignment List",
          "sequence_number": 1,
          "description": "View and manage seat assignments for flight instances.",
          "tables": [
            {
              "table_name": "seat_assignments",
              "comment": "Stores information about seat assignments for passengers on flight instances.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 801 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "flight_instance_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.flight_instances(id) ON DELETE CASCADE",
                  "comment": "Flight instance for the seat assignment."
                },
                {
                  "name": "passenger_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.passengers(id) ON DELETE RESTRICT",
                  "comment": "Passenger assigned to the seat."
                },
                {
                  "name": "booking_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.bookings(id) ON DELETE CASCADE",
                  "comment": "Booking associated with the seat assignment."
                },
                {
                  "name": "seat_number",
                  "type": "VARCHAR(10)",
                  "constraints": "NOT NULL",
                  "comment": "Assigned seat number."
                },
                {
                  "name": "seat_class",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (seat_class IN ('economy', 'business'))",
                  "comment": "Class of the assigned seat."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 9,
      "menu_name": "Payment Management",
      "sequence_number": 9,
      "description": "Manage payment transactions for bookings.",
      "submenus": [
        {
          "submenu_id": 901,
          "submenu_name": "Payment List",
          "sequence_number": 1,
          "description": "View and manage payments for bookings.",
          "tables": [
            {
              "table_name": "payments",
              "comment": "Stores information about payments for bookings, including amount and method.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 901 NOT NULL REFERENCES nams.submenu(submenu_id)"
                },
                {
                  "name": "booking_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES nams.bookings(id) ON DELETE RESTRICT",
                  "comment": "Booking associated with the payment."
                },
                {
                  "name": "amount",
                  "type": "DECIMAL(10, 2)",
                  "constraints": "NOT NULL CHECK (amount >= 0)",
                  "comment": "Amount of the payment."
                },
                {
                  "name": "payment_method",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (payment_method IN ('cash', 'card', 'bank_transfer', 'mobile_wallet'))",
                  "comment": "Method of payment used."
                },
                {
                  "name": "payment_status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (payment_status IN ('pending', 'completed', 'failed', 'refunded'))",
                  "comment": "Current status of the payment."
                },
                {
                  "name": "transaction_id",
                  "type": "VARCHAR(100)",
                  "comment": "Transaction ID for the payment."
                },
                {
                  "name": "payment_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP",
                  "comment": "Date and time when the payment was made."
                },
                {
                  "name": "refund_amount",
                  "type": "DECIMAL(10, 2)",
                  "constraints": "DEFAULT 0",
                  "comment": "Amount refunded, if any."
                },
                {
                  "name": "refund_date",
                  "type": "TIMESTAMP",
                  "comment": "Date and time when the refund was processed."
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "comment": "Additional notes about the payment."
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "assumptions": [
    "Each flight schedule can have multiple instances based on recurrence.",
    "Bookings can include multiple passengers, each with their own seat assignment.",
    "Payment records are linked to bookings and can handle refunds."
  ],
  "open_questions": [
    "Should the system support international flights in the future?",
    "Is there a need for loyalty programs or frequent flyer tracking?"
  ]
}
