{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.couldbuild.app/schemas/export-v1.json",
  "title": "couldbuild export",
  "type": "object",
  "required": ["format", "version", "exportedAt", "app", "plans"],
  "additionalProperties": false,
  "properties": {
    "$schema": { "type": "string" },
    "format": { "const": "couldbuild.export" },
    "version": { "const": 1 },
    "exportedAt": { "type": "string" },
    "app": { "const": "couldbuild" },
    "plans": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "assumptions", "setupComplete"],
        "additionalProperties": false,
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string", "minLength": 1, "maxLength": 120 },
          "setupComplete": { "type": "boolean" },
          "assumptions": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "landCost": { "type": "number" },
              "buildCost": { "type": "number" },
              "servicesConnections": { "type": "number" },
              "designConsents": { "type": "number" },
              "contingencyPercent": { "type": "number" },
              "currentHomeValue": { "type": "number" },
              "currentMortgage": { "type": "number" },
              "existingMortgageTermYears": { "type": "number" },
              "saleCostsPercent": { "type": "number" },
              "cashSavings": { "type": "number" },
              "annualIncome": { "type": "number" },
              "interestRate": { "type": "number" },
              "loanTermYears": { "type": "number" },
              "constructionLoanRate": { "type": "number" },
              "buildLengthMonths": { "type": "number" },
              "constructionDrawdownPercent": { "type": "number" },
              "rentalIncomeWeekly": { "type": "number" },
              "rentalExpensesWeekly": { "type": "number" },
              "annualHomeValueGrowthPercent": { "type": "number" },
              "annualBuildCostGrowthPercent": { "type": "number" },
              "annualIncomeGrowthPercent": { "type": "number" },
              "additionalSavingsPerYear": { "type": "number" },
              "sensitivityPercent": { "type": "number" },
              "landLegalCosts": { "type": "number" },
              "siteWorks": { "type": "number" },
              "externalWorks": { "type": "number" },
              "builderVariations": { "type": "number" },
              "expectedCompletedHomeValue": { "type": "number" },
              "lenderMaxLvrPercent": { "type": "number" },
              "lenderFees": { "type": "number" },
              "temporaryHousingMonthly": { "type": "number" },
              "newHomeOwnershipCostsMonthly": { "type": "number" }
            }
          }
        }
      }
    }
  }
}
