schema:
  type: object
  title: Aircraft Configuration
  version: 2.0.0
  properties:
    metadata:
      description: Metadata when the record is processed
      title: Metadata
      type: object
    registration:
      description: Registration of the Aircraft
      examples:
      - BLBK
      - BLXN
      maxLength: 10
      title: Registration
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 10
        non_empty_string: null
    valid_since:
      description: Start of validity
      format: date-time
      title: Valid Since
      type: string
      coercion: coerce_to_datetime
    valid_until:
      description: End of validity
      format: date-time
      title: Valid Until
      type: string
      coercion: coerce_to_datetime
    ac_operator:
      description: Aircraft Operator
      examples:
      - CX
      - KA
      maxLength: 3
      title: Ac Operator
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 3
        non_empty_string: null
    ac_owner:
      description: Owner of the aircraft
      examples:
      - CX
      - KA
      maxLength: 3
      title: Ac Owner
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 3
        non_empty_string: null
    ac_subtype:
      description: Subtype of the aircraft
      maxLength: 3
      title: Ac Subtype
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 3
        non_empty_string: null
    ac_logical_no:
      description: Logical number of the Aircraft
      title: Ac Logical No
      type: integer
      coercion: coerce_to_integer
    ac_state:
      description: Status of Aircraft('R'=real and 'O'=overflow)
      enum:
      - R
      - O
      maxLength: 1
      title: Ac State
      type: string
      coercion: coerce_to_string
      validations:
        only_allow:
          allowed_values:
          - R
          - O
    dry_operating_wgt:
      description: Dry Operating Weight (kg)
      title: Dry Operating Wgt
      type: integer
      coercion: coerce_to_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    max_takeoff_wgt:
      description: Max Takeoff Weight (kg)
      title: Max Takeoff Wgt
      type: integer
      coercion: coerce_to_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    cargo_capacity:
      description: Cargo Capacity (kg)
      title: Cargo Capacity
      type: integer
      coercion: coerce_to_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    fuel_capacity:
      description: Fuel Capacity (kg)
      title: Fuel Capacity
      type: integer
      coercion: coerce_to_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    avg_fuel_consump:
      description: Average Fuel Consumption (kg per hour)
      title: Avg Fuel Consump
      type: integer
      coercion: coerce_to_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    ac_index:
      description: Aircraft index
      title: Ac Index
      type: integer
      coercion: coerce_to_integer
    crewsize_cockpit:
      description: Number of Cockpit Crewmembers
      title: Crewsize Cockpit
      type: integer
      coercion: coerce_to_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    crewsize_cabin:
      description: Number of Cabin Crewmembers
      title: Crewsize Cabin
      type: integer
      coercion: coerce_to_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    std_version:
      description: Aircraft Standard Version
      maxLength: 20
      title: Std Version
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 20
        non_empty_string: null
    ap_restriction:
      description: Airport Restriction - e.g. Political Reason, Performance('Y' or 'N')
      examples:
      - N
      - Y
      - R
      maxLength: 1
      title: Ap Restriction
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 1
        non_empty_string: null
    ac_owner_name:
      description: Full Name of Owner
      maxLength: 30
      title: Ac Owner Name
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 30
        non_empty_string: null
    ac_subtype_name:
      description: Full Name of Subtype
      maxLength: 30
      title: Ac Subtype Name
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 30
        non_empty_string: null
    ac_category:
      description: SSIM-Category of Aircraft
      maxLength: 1
      title: Ac Category
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 1
        non_empty_string: null
    remark:
      anyOf:
      - maxLength: 80
        type: string
      - type: 'null'
      default: null
      description: Additional remarks
      title: Remark
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 80
    fuel_measure_unit:
      description: Unit for fuel
      maxLength: 3
      title: Fuel Measure Unit
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 3
        non_empty_string: null
    ac_callsign:
      anyOf:
      - maxLength: 5
        type: string
      - type: 'null'
      default: null
      description: Callsign of aircraft
      title: Ac Callsign
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 5
    radio:
      anyOf:
      - maxLength: 1
        type: string
      - type: 'null'
      default: null
      description: Radio type
      title: Radio
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 1
    noise:
      anyOf:
      - type: integer
      - type: 'null'
      default: null
      description: ICAO noise chapter
      title: Noise
      coercion: coerce_to_nullable_integer
      validations:
        greater_than_or_equal_to:
          threshold: 0
    phone:
      anyOf:
      - maxLength: 20
        type: string
      - type: 'null'
      default: null
      description: Onboard mobile phone number
      title: Phone
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 20
    special_equipment:
      anyOf:
      - maxLength: 40
        type: string
      - type: 'null'
      default: null
      description: Special equipment
      title: Special Equipment
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 40
    acars:
      anyOf:
      - maxLength: 1
        type: string
      - type: 'null'
      default: null
      description: ACARS type
      enum:
      - V
      - H
      - S
      title: Acars
      coercion: coerce_to_nullable_string
      validations:
        only_allow:
          allowed_values:
          - V
          - H
          - S
    alt_reg:
      anyOf:
      - maxLength: 10
        type: string
      - type: 'null'
      default: null
      description: Alternate Registration
      title: Alt Reg
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 10
    record_id:
      default: 0
      description: Record ID
      title: Record Id
      type: integer
      coercion: coerce_to_integer
    last_update:
      anyOf:
      - format: date-time
        type: string
      - type: 'null'
      default: null
      description: Timestamp of last update
      title: Last Update
      coercion: coerce_to_nullable_datetime
    last_update_user_id:
      anyOf:
      - maxLength: 32
        type: string
      - type: 'null'
      default: null
      description: User ID of last update
      title: Last Update User Id
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 32
    std_version_alt_1:
      anyOf:
      - maxLength: 20
        type: string
      - type: 'null'
      default: null
      description: Alternative Aircraft Version 1
      title: Std Version Alt 1
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 20
    std_version_alt_2:
      anyOf:
      - maxLength: 20
        type: string
      - type: 'null'
      default: null
      description: Alternative Aircraft Version 2
      title: Std Version Alt 2
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 20
    std_version_alt_3:
      anyOf:
      - maxLength: 20
        type: string
      - type: 'null'
      default: null
      description: Alternative Aircraft Version 3
      title: Std Version Alt 3
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 20
    std_version_alt_4:
      anyOf:
      - maxLength: 20
        type: string
      - type: 'null'
      default: null
      description: Alternative Aircraft Version 4
      title: Std Version Alt 4
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 20
    ils_equipment:
      default: I
      description: aircraft equipment supporting ILS CAT approaches(I, II, IIIa, IIIb)
      enum:
      - I
      - II
      - IIIa
      - IIIb
      maxLength: 4
      title: Ils Equipment
      type: string
      coercion: coerce_to_string
      validations:
        only_allow:
          allowed_values:
          - I
          - II
          - IIIa
          - IIIb
    autoland:
      default: N
      description: Autoland capability indicator
      enum:
      - Y
      - N
      maxLength: 1
      title: Autoland
      type: string
      coercion: coerce_to_string
      validations:
        only_allow:
          allowed_values:
          - Y
          - N
    homebase:
      anyOf:
      - maxLength: 3
        type: string
      - type: 'null'
      default: null
      description: Homebase of the aircraft (IATA CODE)
      title: Homebase
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 3
    aircraft_compartment:
      description: List of aircraft compartments with seat configurations
      items:
        type: object
      title: Aircraft Compartment
      type: array
    aircraft_restriction:
      description: List of aircraft restrictions with constraint codes
      items:
        type: object
      title: Aircraft Restriction
      type: array
  required:
  - metadata
  - registration
  - valid_since
  - valid_until
  - ac_operator
  - ac_owner
  - ac_subtype
  - ac_logical_no
  - ac_state
  - dry_operating_wgt
  - max_takeoff_wgt
  - cargo_capacity
  - fuel_capacity
  - avg_fuel_consump
  - ac_index
  - crewsize_cockpit
  - crewsize_cabin
  - std_version
  - ap_restriction
  - ac_owner_name
  - ac_subtype_name
  - ac_category
  - fuel_measure_unit
metadata:
  title: Aircraft Configuration
  status: active
  type: object
  description: Default metadata for Aircraft Configuration
  validation_title: Aircraft Configuration
  created_at: '2025-08-28T04:10:45.905705+00:00'
  updated_at: '2025-08-28T04:10:45.905712+00:00'
  created_by: IOC DE
  updated_by: IOC DE
  data_feed_association:
  - title: Aircraft Configuration
    type: Operational
  pulls_from:
  - NetlineOpsReplica
  pushes_to:
  - SCR
  - Fleetwise
  system_sources:
  - NetlineBase
  dependencies:
  - Aircraft
  - AircraftType
  - Subfleet
  - Operator
  # Ownership - references owner IDs from owners table
  # These will be stored in join tables: metadata_record_business_owners, etc.
  business_owners:
  - operations-team
  bu_sme: []
  it_application_owners: []
  it_sme: []
  domain: NetlineOps configuration
  data_quality:
    accuracy: 0.0
    monitoring_enabled: false
    sla: null
    total_records: 0
    last_updated: '2024-01-01T00:00:00'
  governance_rules:
    data_retention:
      days: 2555
      reason: Regulatory compliance for aircraft configuration records
    pii_fields:
      fields: []
    sensitivity: Internal
    access_control:
      read:
      - operations-team
      - data-team
      write:
      - operations-team
  business_rules:
    validity_period:
      description: valid_since must be before valid_until
      enforced: true
    weight_consistency:
      description: max_takeoff_wgt should be >= dry_operating_wgt
      enforced: false
  serve:
    api:
      type: GET
      endpoint: /v1/aircraft-configuration
      rate_limit: 120/min
      cache_ttl: 3600
      confluence_page: https://cathaypacific-prod.atlassian.net/wiki/spaces/DEN/pages/AircraftConfiguration
      params:
      - name: registration
        in: query
        required: false
        description: Filter by registration
        schema:
          type: string
        example: BLXN
      - name: effective_date
        in: query
        required: false
        description: Filter by effective date in ISO format, default will be request
          timestamp
        example: '2025-03-29T00:00:00Z'
        schema:
          type: string
          format: date-time
  indexes:
  - cluster: ioc-de-{env}
    database: internal
    collection: replica_nlo_aircraft_configuration_serve
    indexes:
    - aircraft_configuration_unique_index:
        registration: 1
        valid_since: 1
      unique: true
      background: true
  - cluster: ioc-de-{env}
    database: internal
    collection: replica_nlo_aircraft_configuration_staging
    indexes:
    - aircraft_configuration_unique_index:
        registration: 1
        valid_since: 1
      unique: true
      background: true
  changelog:
  - version: 1.0.0
    date: '2025-08-28T04:10:45.905715+00:00'
    author: IOC
    type: initial
    changes:
    - 'Initial metadata collected from upstream for: Aircraft Configuration'
  ownership:
    owner: operations-team
    team: data-engineering
    additional_info: {}
versions:
  schema: 1.0.0
  coercion_rules: 1.0.0
  validation_rules: 1.0.0
  metadata: 1.0.0

