{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://uwmd.org/schemas/lease-up-cash-flow-plan.schema.json",
  "title": "lease-up-cash-flow-plan",
  "description": "RFC 0044 / Protocol VIII.9.5. Cross-field coverage, ordering, source verification and digest agreement require semantic checks.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "source_variant",
    "day_count",
    "cash_dates"
  ],
  "properties": {
    "source_variant": {
      "type": "string",
      "minLength": 1
    },
    "day_count": {
      "enum": [
        "actual/365f",
        "actual/360",
        "30/360us"
      ]
    },
    "cash_dates": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "period",
          "date"
        ],
        "properties": {
          "period": {
            "type": "string",
            "pattern": "^\\d{4}-(Q[1-4]|0[1-9]|1[0-2])$"
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "format": "date"
          }
        }
      }
    }
  }
}
