{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.2/project/project.schema.json",
  "title": "project/project.json",
  "description": "The project record: the schema version, the project's settings and its project information.",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "deprecated": true,
      "description": "Deprecated in 0.2, and removed in 1.0: the format names a model's version (Part I, 9.3). A reader of 0.2 does not read it and refuses no value of it; a writer of 0.2 adds none, and keeps one a model gives."
    },
    "project": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "units": {
          "type": "string",
          "const": "mm"
        },
        "upAxis": {
          "type": "string",
          "const": "Z"
        },
        "elevationOffset": {
          "type": "number"
        },
        "rooms": {
          "type": "object",
          "properties": {
            "openingMinArea": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "doorsFromSkirting": {
              "type": "boolean"
            },
            "source": {
              "type": "string",
              "maxLength": 300
            },
            "roomToMove": {
              "type": "object",
              "properties": {
                "circle": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number",
                    "minimum": 300,
                    "maximum": 5000
                  },
                  "propertyNames": {
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "front": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number",
                    "minimum": 100,
                    "maximum": 3000
                  },
                  "propertyNames": {
                    "enum": [
                      "wc",
                      "washbasin",
                      "bathtub",
                      "kitchen",
                      "wardrobe"
                    ]
                  }
                },
                "source": {
                  "type": "string",
                  "maxLength": 300
                }
              },
              "x-eik-closed": true
            }
          },
          "x-eik-closed": true
        },
        "site": {
          "$ref": "site.schema.json"
        },
        "excavation": {
          "type": "object",
          "properties": {
            "workingSpace": {
              "type": "number",
              "minimum": 0,
              "maximum": 10000
            },
            "slope": {
              "type": "number",
              "minimum": 0,
              "maximum": 20
            },
            "topsoil": {
              "type": "number",
              "minimum": 0,
              "maximum": 2000
            },
            "off": {
              "type": "boolean"
            }
          },
          "required": [
            "workingSpace",
            "slope",
            "topsoil"
          ],
          "x-eik-closed": true
        },
        "precast": {
          "type": "object",
          "properties": {
            "joint": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "corner": {
              "type": "string",
              "enum": [
                "wrapped",
                "lapped"
              ]
            },
            "maxLength": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 40000
            },
            "maxHeight": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 20000
            },
            "maxWeight": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 200000
            },
            "liftingFactor": {
              "type": "number",
              "minimum": 1,
              "maximum": 5
            },
            "minPier": {
              "type": "number",
              "minimum": 0,
              "maximum": 5000
            },
            "minLintel": {
              "type": "number",
              "minimum": 0,
              "maximum": 5000
            },
            "reinforcement": {
              "type": "object",
              "properties": {
                "mesh": {
                  "type": "string",
                  "minLength": 1,
                  "x-eik-values": "national"
                },
                "bar": {
                  "type": "integer",
                  "minimum": 6,
                  "maximum": 25,
                  "default": 10
                },
                "grade": {
                  "type": "string",
                  "minLength": 1,
                  "x-eik-values": "national"
                },
                "cover": {
                  "type": "number",
                  "minimum": 10,
                  "maximum": 75,
                  "default": 25
                },
                "end": {
                  "type": "number",
                  "minimum": 10,
                  "maximum": 200,
                  "default": 50
                },
                "anchorage": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 80,
                  "default": 35
                },
                "both": {
                  "type": "number",
                  "minimum": 60,
                  "maximum": 1000,
                  "default": 100
                },
                "seamMesh": {
                  "type": "string",
                  "minLength": 1,
                  "x-eik-values": "national"
                },
                "edgeU": {
                  "type": "object",
                  "properties": {
                    "diameter": {
                      "type": "integer",
                      "minimum": 5,
                      "maximum": 16,
                      "default": 6
                    },
                    "spacing": {
                      "type": "number",
                      "minimum": 50,
                      "maximum": 600,
                      "default": 150
                    },
                    "leg": {
                      "type": "number",
                      "minimum": 100,
                      "maximum": 1000,
                      "default": 300
                    }
                  },
                  "x-eik-closed": true
                }
              },
              "x-eik-closed": true
            }
          },
          "x-eik-closed": true
        },
        "standards": {
          "type": "object",
          "x-eik-application": true
        },
        "envelope": {
          "type": "object",
          "properties": {
            "airLeakage": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 100
            },
            "thermalBridges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "psi": {
                    "type": "number",
                    "minimum": -2,
                    "maximum": 5
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "kind",
                  "psi"
                ],
                "x-eik-closed": true
              },
              "maxItems": 1000
            },
            "dimensions": {
              "type": "string",
              "enum": [
                "internal",
                "overall-internal",
                "external"
              ]
            }
          },
          "x-eik-closed": true
        },
        "classifications": {
          "$ref": "../classifications/classifications.schema.json"
        }
      },
      "required": [
        "id",
        "name",
        "units",
        "upAxis"
      ],
      "x-eik-closed": true
    },
    "projectInformation": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string",
          "maxLength": 200
        },
        "client": {
          "type": "string",
          "maxLength": 200
        },
        "property": {
          "type": "string",
          "maxLength": 200
        },
        "municipality": {
          "type": "string",
          "maxLength": 200
        },
        "description": {
          "type": "string",
          "maxLength": 200
        },
        "address": {
          "type": "string",
          "maxLength": 300
        },
        "organization": {
          "type": "string",
          "maxLength": 200
        },
        "organizationAddress": {
          "type": "string",
          "maxLength": 300
        },
        "status": {
          "type": "string",
          "maxLength": 200
        },
        "issueDate": {
          "type": "string",
          "maxLength": 60
        },
        "custom": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "maxLength": 400
          }
        }
      },
      "x-eik-closed": true
    }
  },
  "required": [
    "project"
  ],
  "x-eik-closed": true
}
