# Coercion rules seed: one record per contract, linked by contract_name and contract_version.

- contract_name: example_user_contract
  contract_version: "1.0.0"
  title: example_user_coercion
  version: "1.0.0"
  description: null
  rules:
    user_id: coerce_to_string
    name: coerce_to_stripped_string
    email: coerce_to_lowercase
    status: coerce_to_lowercase
    created_at: coerce_to_datetime

- contract_name: example_event_contract
  contract_version: "1.0.0"
  title: example_event_coercion
  version: "1.0.0"
  description: null
  rules:
    event_id: coerce_to_string
    event_type: coerce_to_lowercase
    occurred_at: coerce_to_datetime

- contract_name: aircraft_configuration
  contract_version: "1.0.0"
  title: aircraft_configuration_coercion
  version: "1.0.0"
  description: Coercion rules for Aircraft Configuration dataset
  rules:
    registration: coerce_to_string
    ac_operator: coerce_to_string
    ac_owner: coerce_to_string
    ac_subtype: coerce_to_string
    ac_state: coerce_to_string
    std_version: coerce_to_string
    ap_restriction: coerce_to_string
    ac_owner_name: coerce_to_string
    ac_subtype_name: coerce_to_string
    ac_category: coerce_to_string
    fuel_measure_unit: coerce_to_string
    ils_equipment: coerce_to_string
    autoland: coerce_to_string
    valid_since: coerce_to_datetime
    valid_until: coerce_to_datetime
    last_update: coerce_to_nullable_datetime
    ac_logical_no: coerce_to_integer
    dry_operating_wgt: coerce_to_integer
    max_takeoff_wgt: coerce_to_integer
    cargo_capacity: coerce_to_integer
    fuel_capacity: coerce_to_integer
    avg_fuel_consump: coerce_to_integer
    ac_index: coerce_to_integer
    crewsize_cockpit: coerce_to_integer
    crewsize_cabin: coerce_to_integer
    record_id: coerce_to_integer
    remark: coerce_to_nullable_string
    ac_callsign: coerce_to_nullable_string
    radio: coerce_to_nullable_string
    phone: coerce_to_nullable_string
    special_equipment: coerce_to_nullable_string
    acars: coerce_to_nullable_string
    alt_reg: coerce_to_nullable_string
    last_update_user_id: coerce_to_nullable_string
    std_version_alt_1: coerce_to_nullable_string
    std_version_alt_2: coerce_to_nullable_string
    std_version_alt_3: coerce_to_nullable_string
    std_version_alt_4: coerce_to_nullable_string
    homebase: coerce_to_nullable_string
    noise: coerce_to_nullable_integer
    aircraft_owner: coerce_to_nullable_string
    aircraft_subtype: coerce_to_nullable_string
    fleet_print_code: coerce_to_nullable_string
    rotational_flag: coerce_to_nullable_string
    standard_configuration: coerce_to_nullable_string
    payload: coerce_to_nullable_float
    mtom: coerce_to_nullable_float
    max_range: coerce_to_nullable_float
    noise_category: coerce_to_nullable_string
    average_speed: coerce_to_nullable_float
    aircraft_group: coerce_to_nullable_string
    icao_code: coerce_to_nullable_string
    name: coerce_to_nullable_string
    body_type: coerce_to_nullable_string
    category: coerce_to_nullable_string

- contract_name: airports_and_geographic_information
  contract_version: "1.0.0"
  title: airports_and_geographic_information_coercion
  version: "1.0.0"
  description: Coercion rules for Airports and Geographic Information dataset
  rules:
    iata_ap_code: coerce_to_string
    ap_name: coerce_to_string
    country_code: coerce_to_string
    dst_zone_code: coerce_to_string
    category: coerce_to_string
    time_zone: coerce_to_string
    coord_longitude: coerce_to_string
    coord_latitude: coerce_to_string
    valid_since: coerce_to_datetime
    valid_until: coerce_to_datetime
    last_update: coerce_to_nullable_datetime
    record_id: coerce_to_integer
    icao_code: coerce_to_nullable_string
    area: coerce_to_nullable_string
    external_reference: coerce_to_nullable_string
    last_update_user_id: coerce_to_nullable_string
    ap_name_nls: coerce_to_nullable_string
    iata_city_code: coerce_to_nullable_string
    city: coerce_to_nullable_string
    state_designator: coerce_to_nullable_string
    country: coerce_to_nullable_string
    diff_utc_lst: coerce_to_nullable_integer
    diff_lst_dst: coerce_to_nullable_integer

# Domain entity coercion (minimal)
- contract_name: order_domain
  contract_version: "1.0.0"
  title: order_domain_coercion
  version: "1.0.0"
  description: Order domain coercion
  rules:
    order_id: coerce_to_string
    symbol: coerce_to_string
    side: coerce_to_lowercase
    status: coerce_to_string
    created_at: coerce_to_datetime

- contract_name: intraday_signal_domain
  contract_version: "1.0.0"
  title: intraday_signal_domain_coercion
  version: "1.0.0"
  description: Intraday signal domain coercion
  rules:
    signal_id: coerce_to_string
    symbol: coerce_to_string
    status: coerce_to_string
    created_at: coerce_to_datetime

- contract_name: intraday_session_domain
  contract_version: "1.0.0"
  title: intraday_session_domain_coercion
  version: "1.0.0"
  description: Intraday session domain coercion
  rules:
    session_id: coerce_to_string
    account_id: coerce_to_string
    status: coerce_to_string
    started_at: coerce_to_datetime
    ended_at: coerce_to_datetime

- contract_name: portfolio_domain
  contract_version: "1.0.0"
  title: portfolio_domain_coercion
  version: "1.0.0"
  description: Portfolio domain coercion
  rules:
    portfolio_id: coerce_to_string
    status: coerce_to_string
    last_rebalance_at: coerce_to_datetime
    created_at: coerce_to_datetime

- contract_name: optimization_cycle_domain
  contract_version: "1.0.0"
  title: optimization_cycle_domain_coercion
  version: "1.0.0"
  description: Optimization cycle domain coercion
  rules:
    run_id: coerce_to_string
    portfolio_id: coerce_to_string
    status: coerce_to_string
    started_at: coerce_to_datetime
    completed_at: coerce_to_datetime

- contract_name: flight_domain
  contract_version: "1.0.0"
  title: flight_domain_coercion
  version: "1.0.0"
  description: Flight domain coercion
  rules:
    flight_id: coerce_to_string
    origin: coerce_to_string
    destination: coerce_to_string
    status: coerce_to_string
    scheduled_departure: coerce_to_datetime
    scheduled_arrival: coerce_to_datetime
    actual_departure: coerce_to_datetime
    actual_arrival: coerce_to_datetime
    aircraft_registration: coerce_to_string
    created_at: coerce_to_datetime
