{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "An assertion that a particular flight existed, rather than a personal log entry about the author. Only 'createdAt' is required. Every other field is optional, and absent means unknown or not applicable rather than empty or zero. The exception is 'relationship', where absent means no claim is being made. Records of the same flight written by different people are expected, so write the identifying fields consistently. Any kind of flying is in scope, and origin may equal destination.",
      "key": "tid",
      "record": {
        "properties": {
          "actualGateArrival": {
            "description": "Actual 'in' time, reaching the gate or parking position. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "actualGateDeparture": {
            "description": "Actual 'out' time, leaving the gate or parking position. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "actualLanding": {
            "description": "Actual 'on' time, wheels on. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "actualTakeoff": {
            "description": "Actual 'off' time, wheels off. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "aircraftType": {
            "description": "Free-text aircraft type as the source expressed it, for example 'Boeing 737-800'. Not normalised and not reliable for matching. Several distinct ICAO designators can share one marketing name.",
            "maxLength": 128,
            "type": "string"
          },
          "cabin": {
            "description": "Cabin or class of service. An open string in lower camel case; the known values are not exhaustive.",
            "knownValues": [
              "economy",
              "premiumEconomy",
              "business",
              "first"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "callsign": {
            "description": "The flight identification the aircraft broadcast, uppercase and exactly as transmitted. Holds the whole callsign, never a fragment of one. May be an operator designator followed by a flight number, a registration, or a string with no internal structure.",
            "maxLength": 16,
            "type": "string"
          },
          "createdAt": {
            "description": "When this record was written, not when the flight happened. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "date": {
            "description": "Calendar date of departure at the origin, as 'YYYY-MM-DD'. Part of the identity key with 'operator' and 'flightNumber'. Must agree with any departure timestamp.",
            "maxLength": 10,
            "type": "string"
          },
          "destination": {
            "description": "Where the flight arrived, or was intended to arrive if it was cancelled. If it diverted, this stays the intended destination and 'diversionAirport' holds where it landed.",
            "ref": "com.airplaneian.contrail.temp.defs#place",
            "type": "ref"
          },
          "diversionAirport": {
            "description": "Where the flight actually landed, when that was not 'destination'. Present only when 'status' is 'diverted'.",
            "ref": "com.airplaneian.contrail.temp.defs#place",
            "type": "ref"
          },
          "flightNumber": {
            "description": "The operating agency's flight number, as a string. Digits only, without the operator prefix.",
            "maxLength": 16,
            "type": "string"
          },
          "icao24": {
            "description": "The airframe's 24-bit ICAO address, six lowercase hexadecimal characters. With an actual departure time this is the identity key for flights with no flight number.",
            "maxLength": 8,
            "type": "string"
          },
          "icaoTypeDesignator": {
            "description": "ICAO aircraft type designator, for example 'B77W'.",
            "maxLength": 8,
            "type": "string"
          },
          "marketingAirline": {
            "description": "ICAO designator of the airline that sold the flight, when it differs from 'operator'. Codeshares only.",
            "maxLength": 8,
            "type": "string"
          },
          "marketingFlightNumber": {
            "description": "Flight number under which the flight was sold, when it differs from 'flightNumber'.",
            "maxLength": 16,
            "type": "string"
          },
          "notes": {
            "description": "Free-text note. Public as soon as the record is written, and copies may persist after the record is deleted. Do not put booking references or other credentials here.",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "operator": {
            "description": "ICAO designator of the agency that operated the flight, three letters, uppercase. Not airlines only: 'UAL', 'FDX', 'RCH'. Use 'operatorName' where no designator exists.",
            "maxLength": 8,
            "type": "string"
          },
          "operatorName": {
            "description": "Free-text name of the operating agency, for operators with no ICAO designator. Not reliable for matching. This is who flew the aircraft, which is often not who owns it.",
            "maxLength": 128,
            "type": "string"
          },
          "origin": {
            "description": "Where the flight departed. May equal 'destination'; local flights are ordinary.",
            "ref": "com.airplaneian.contrail.temp.defs#place",
            "type": "ref"
          },
          "registeredOwner": {
            "description": "Free-text name of the party the airframe is registered to. Often a trust or holding company, and frequently not the operator.",
            "maxLength": 128,
            "type": "string"
          },
          "registration": {
            "description": "Registration or tail number, uppercase with no hyphens or spaces, so that 'G-VBOW' and 'GVBOW' are one aircraft. Military and state identifiers go here too.",
            "maxLength": 16,
            "type": "string"
          },
          "relationship": {
            "description": "The author's connection to this flight. Absent means no claim is being made, unlike every other field where absent means unknown. An open string: the known values are not exhaustive.",
            "knownValues": [
              "passenger",
              "pic",
              "sic",
              "student",
              "instructor",
              "crew",
              "observer"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "route": {
            "description": "The route as filed, written as the flight plan expressed it, for example 'SSTIK2 SSTIK Q90 AVOSE'. Free text, not normalised and not reliable for matching. This is the planned route, not the flown track: a track belongs in a surveillance archive, which 'icao24' and a departure time are enough to query.",
            "maxLength": 1000,
            "type": "string"
          },
          "scheduledGateArrival": {
            "description": "Scheduled 'in' time, reaching the gate or parking position. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "scheduledGateDeparture": {
            "description": "Scheduled 'out' time, leaving the gate or parking position. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "scheduledLanding": {
            "description": "Scheduled 'on' time, wheels on. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "scheduledTakeoff": {
            "description": "Scheduled 'off' time, wheels off. Explicit UTC offset, no fractional seconds.",
            "format": "datetime",
            "type": "string"
          },
          "seat": {
            "description": "Seat occupied, as a string, for example '14C'.",
            "maxLength": 16,
            "type": "string"
          },
          "source": {
            "description": "Short identifier for the tool or dataset that wrote this record, for example 'flighty', 'manual', or 'adsb'.",
            "maxLength": 64,
            "type": "string"
          },
          "sourceId": {
            "description": "That tool's own identifier for this flight. Kept in the record body rather than the record key, so a record can be corrected without becoming a new one. Meaningful only with 'source'.",
            "maxLength": 512,
            "type": "string"
          },
          "status": {
            "description": "How the flight concluded. Absent means unknown, so write 'normal' explicitly when the flight operated as planned.",
            "knownValues": [
              "normal",
              "cancelled",
              "diverted"
            ],
            "maxLength": 32,
            "type": "string"
          }
        },
        "required": [
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.airplaneian.contrail.temp.flight",
  "lexicon": 1
}
