{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://brdmap.de/event.schema.json",
  "title": "BRDMap Event",
  "description": "Ein einzelnes Vorfall-/Warnungs-Objekt wie in events.json und der /events-API. Quellen sind amtlich (Polizei/Feuerwehr-Pressemitteilungen, BBK/NINA-Warnungen).",
  "type": "object",
  "required": [
    "id",
    "category",
    "severity",
    "title_de",
    "occurred_at",
    "geo_state"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Eindeutige Event-ID."
    },
    "category": {
      "type": "string",
      "enum": [
        "BRAND_FEUER",
        "UNFALL_VERKEHR",
        "KRIMINALITAET",
        "POLIZEIEINSATZ",
        "WETTER_NATUR",
        "KATASTROPHE",
        "DEMO_STREIK",
        "POLITIK",
        "GROSSEVENT"
      ],
      "description": "Kategorie (LLM-klassifiziert)."
    },
    "category_label": {
      "type": "string",
      "description": "Menschenlesbares Kategorie-Label (DE)."
    },
    "severity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5,
      "description": "Schweregrad 1 (alltäglich) bis 5 (Großschadenslage). Redaktionelle LLM-Klassifikation."
    },
    "title_de": {
      "type": "string",
      "description": "Titel der Meldung."
    },
    "summary_de": {
      "type": [
        "string",
        "null"
      ],
      "description": "Kurzzusammenfassung."
    },
    "lat": {
      "type": [
        "number",
        "null"
      ],
      "description": "Breitengrad (WGS84). null wenn nicht geocodet."
    },
    "lon": {
      "type": [
        "number",
        "null"
      ],
      "description": "Längengrad (WGS84). null wenn nicht geocodet."
    },
    "geo_city": {
      "type": [
        "string",
        "null"
      ],
      "description": "Stadt/Gemeinde, falls aufgelöst."
    },
    "geo_state": {
      "type": "string",
      "enum": [
        "BW",
        "BY",
        "BE",
        "BB",
        "HB",
        "HH",
        "HE",
        "MV",
        "NI",
        "NW",
        "RP",
        "SL",
        "SN",
        "ST",
        "SH",
        "TH"
      ],
      "description": "Bundesland (ISO-3166-2:DE ohne DE-Präfix)."
    },
    "geo_confidence": {
      "type": [
        "number",
        "string",
        "null"
      ],
      "description": "Geocoding-Konfidenz/Importance."
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time",
      "description": "Zeitstempel des Vorfalls (ISO 8601, UTC)."
    },
    "ingested_at": {
      "type": "string",
      "format": "date-time",
      "description": "Zeitpunkt der Erfassung bei BRDMap (ISO 8601, UTC)."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Ablauf (v. a. NINA-Warnungen). null = kein Ablauf."
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Zeitpunkt der Aufhebung, falls aufgehoben."
    },
    "sub_tags": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Zusatz-Tags."
    },
    "source_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Quellen-Code (z. B. presseportal_pol_mittelhessen_pst)."
    },
    "source_display": {
      "type": [
        "string",
        "null"
      ],
      "description": "Quellen-Anzeigename."
    },
    "external_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Link zur Original-Pressemeldung."
    },
    "news_slug": {
      "type": [
        "string",
        "null"
      ],
      "description": "Slug der News-Detailseite (/news/{slug}.html)."
    }
  },
  "additionalProperties": true
}