{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "DYNAMIC_MOBILE_REPORTS",
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "id",
      "name",
      "columns"
    ],
    "properties": {
      "id": {
        "title": "Numer identyfikacyjny raportu",
        "type": "string"
      },
      "name": {
        "title": "Nazwa raportu",
        "type": "string"
      },
      "context": {
        "title": "Podmiot którego dotyczą dane",
        "type": "string",
        "enum": [
          "EMPLOYEE"
        ]
      },
      "filteringEnabled": {
        "title": "Dostępne filtrowanie w raporcie",
        "type": "boolean",
        "default": false
      },
      "dateFilterEnabled": {
        "title": "Dostępne filtrowanie po dacie w raporcie",
        "type": "boolean",
        "default": false
      },
      "summaryRow": {
        "title": "Wiersz podsumowujący w raporcie",
        "type": "boolean",
        "default": false
      },
      "columns": {
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "object",
          "required": [
            "id",
            "name",
            "valueType",
            "order"
          ],
          "properties": {
            "id": {
              "title": "Numer identyfikacyjny kolumny",
              "type": "string"
            },
            "name": {
              "title": "Nazwa kolumny",
              "type": "string"
            },
            "valueType": {
              "title": "Typ wartości w kolumnie",
              "type": "string",
              "enum": [
                "TEXT",
                "INTEGER",
                "DECIMAL",
                "MONEY",
                "PERCENT"
              ]
            },
            "order": {
              "title": "Kolejność kolumny w raporcie",
              "type": "integer"
            },
            "sortingEnabled": {
              "title": "Dostępne sortowanie kolumny",
              "type": "boolean"
            }
          }
        }
      },
      "rows": {
        "type": "array",
        "description": "Lista predefiniowanych wierszy w raporcie",
        "items": {
          "type": "object",
          "required": [
            "id",
            "name",
            "order"
          ],
          "properties": {
            "id": {
              "title": "Numer identyfikacyjny wiersza",
              "type": "string"
            },
            "name": {
              "title": "Nazwa wiersza",
              "type": "string"
            },
            "order": {
              "title": "Kolejność wiersza w raporcie",
              "type": "integer"
            }
          }
        }
      }
    }
  }
}