{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "tariff.schema.json",
  "title": "tariff",
  "description": "Enthält Daten über den Tarif",
  "type": "object",
  "properties": {
    "name_for_insurance": {
      "type": "string",
      "minLength": 1,
      "description": "Tarifname bei Versicherung"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Tarifname für Kunden"
    },
    "insurance_start_date": {
      "type": "string",
      "format": "date",
      "description": "Versicherungsstartdatum 'YYYY-MM-DD'"
    },
    "closingdate": {
      "type": "string",
      "pattern": "(\\d{4}|\\d{2})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})",
      "description": "Datum und Uhrzeit Antragsübermittlung 'YYYY-MM-DD hh:mm:ss'"
    },
    "contractperiod": {
      "type": "integer",
      "description": "Vertragslaufzeit in Jahren"
    },
    "paymentperiod": {
      "$ref": "enum/paymentperiod.schema.json#/$defs/paymentperiod",
      "description": "Bezahlperiode ‚month‘ ‚quarter', 'semester', 'year'"
    },
    "grossprice": {
      "type": "number",
      "description": "Bruttopreis"
    },
    "product_dependent": {
      "description": "Produktrelevante Informationen Produktspezifisch",
      "type": "object",
      "properties": {
        "internal_version": {
          "type": "string",
          "description": "Tarifidentifizierung VU-intern"
        },
        "costsharing": {
          "type": "number",
          "description": "Kostenübernahme"
        },
        "notice_period": {
          "type": "integer",
          "description": "Kündigungsfrist in Monaten (0 = täglich kündbar)"
        },
        "in_protection": {
          "$ref": "enum/in_protection.schema.json#/$defs/in_protection",
          "description": "Ob Vollschutz, OP-Schutz oder Unfallschutz 'full', 'op', 'accident'"
        }
      },
      "required": ["costsharing", "notice_period"]
    }
  },
  "required": ["name_for_insurance", "name", "insurance_start_date", "closingdate",
    "contractperiod", "paymentperiod", "grossprice", "product_dependent"]

}