{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DroneTechnicalEntity",
  "type": "object",
  "required": ["id", "brand", "model", "sources", "updated_at"],
  "properties": {
    "id": {"type": "string"},
    "brand": {"type": "string"},
    "model": {"type": "string"},
    "generation": {"type": ["string", "null"]},
    "release_year": {"type": ["integer", "null"]},
    "status": {"enum": ["current", "legacy", "discontinued", "unknown"]},
    "aircraft": {
      "type": "object",
      "properties": {
        "takeoff_weight_g": {"$ref": "#/$defs/spec"},
        "eu_class": {"$ref": "#/$defs/spec"},
        "folded_dimensions_mm": {"$ref": "#/$defs/spec"},
        "max_flight_time_min": {"$ref": "#/$defs/spec"},
        "max_wind_resistance_ms": {"$ref": "#/$defs/spec"},
        "gnss": {"$ref": "#/$defs/spec"},
        "max_transmission_ce_km": {"$ref": "#/$defs/spec"}
      }
    },
    "camera": {
      "type": "object",
      "properties": {
        "sensor_size": {"$ref": "#/$defs/spec"},
        "effective_mp": {"$ref": "#/$defs/spec"},
        "aperture": {"$ref": "#/$defs/spec"},
        "equiv_focal_mm": {"$ref": "#/$defs/spec"},
        "max_video": {"$ref": "#/$defs/spec"},
        "max_4k_fps": {"$ref": "#/$defs/spec"},
        "max_bitrate_mbps": {"$ref": "#/$defs/spec"},
        "photo_raw": {"$ref": "#/$defs/spec"},
        "color_profiles": {"$ref": "#/$defs/spec"},
        "vertical_video": {"$ref": "#/$defs/spec"}
      }
    },
    "stabilization": {
      "type": "object",
      "properties": {
        "gimbal_axes": {"$ref": "#/$defs/spec"},
        "eis": {"$ref": "#/$defs/spec"}
      }
    },
    "safety_navigation": {
      "type": "object",
      "properties": {
        "rth": {"$ref": "#/$defs/spec"},
        "obstacle_sensing": {"$ref": "#/$defs/spec"},
        "tracking": {"$ref": "#/$defs/spec"},
        "waypoints": {"$ref": "#/$defs/spec"}
      }
    },
    "storage": {
      "type": "object",
      "properties": {
        "internal_gb": {"$ref": "#/$defs/spec"},
        "microsd": {"$ref": "#/$defs/spec"}
      }
    },
    "fpv": {
      "type": "object",
      "properties": {
        "type": {"enum": ["none", "wifi-live-view", "digital-fpv", "analog-fpv", "immersive-360", "unknown"]},
        "goggles": {"$ref": "#/$defs/spec"},
        "protocol": {"$ref": "#/$defs/spec"}
      }
    },
    "commerce": {
      "type": "object",
      "properties": {
        "amazon_asins": {"type": "array", "items": {"type": "string"}},
        "amazon_variants": {"type": "array", "items": {"type": "string"}},
        "amazon_screening": {"enum": ["eligible", "exclude", "needs-recheck", "not-sold"]}
      }
    },
    "editorial": {
      "type": "object",
      "properties": {
        "tier": {"enum": ["A", "B", "C", "X"]},
        "primary_categories": {"type": "array", "items": {"type": "string"}},
        "longtail_tags": {"type": "array", "items": {"type": "string"}},
        "verification_notes": {"type": "array", "items": {"type": "string"}}
      }
    },
    "sources": {"type": "array", "items": {"$ref": "#/$defs/source"}},
    "updated_at": {"type": "string", "format": "date"}
  },
  "$defs": {
    "spec": {
      "type": "object",
      "properties": {
        "value": {},
        "status": {"enum": ["verified-primary", "verified-secondary", "manufacturer-claimed", "conflicting", "unknown"]},
        "source_id": {"type": ["string", "null"]},
        "note": {"type": ["string", "null"]}
      }
    },
    "source": {
      "type": "object",
      "required": ["id", "type", "url", "checked_at"],
      "properties": {
        "id": {"type": "string"},
        "type": {"enum": ["official-manual", "official-specs", "official-support", "regulatory", "secondary-technical", "amazon-commercial"]},
        "title": {"type": "string"},
        "url": {"type": "string"},
        "checked_at": {"type": "string", "format": "date"}
      }
    }
  }
}
