{
  "$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_sum": {
      "type": "integer",
      "description": "Versicherungssumme"
    },
    "insurance_start_date": {
      "type": "string",
      "format": "date",
      "description": "Versicherungsstartdatum 'YYYY-MM-DD'"
    },
    "contractperiod": {
      "type": "integer",
      "description": "Vertragslaufzeit in Jahren"
    },
    "paymentperiod": {
      "$ref": "enums/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": {
        "costsharing": {
          "type": "number",
          "description": "Kostenübernahme"
        },
        "notice_period": {
          "type": "integer",
          "description": "Kündigungsfrist in Monaten (0 = täglich kündbar)"
        },
        "discounts": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "discount.schema.json"
          }
        }
      },
      "required": ["costsharing", "notice_period"]
    }
  },
  "required": ["name_for_insurance", "name", "insurance_sum", "insurance_start_date", "contractperiod", "paymentperiod", "grossprice", "product_dependent"]

}