{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/questionnaires.schema.json",
  "title": "tables/questionnaires.json",
  "description": "The rows of the table questionnaires that belong to the workspace, one object per row, keyed by the database's column names.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "organization_id": {
        "type": "string",
        "format": "uuid"
      },
      "title": {
        "type": "string"
      },
      "requester": {
        "type": "string"
      },
      "due_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "status": {
        "type": "string",
        "enum": [
          "open",
          "completed"
        ]
      },
      "source_format": {
        "type": "string",
        "enum": [
          "paste",
          "csv",
          "xlsx",
          "docx"
        ]
      },
      "source_file_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "source_size_bytes": {
        "type": [
          "integer",
          "null"
        ]
      },
      "source_layout": {
        "type": [
          "object",
          "array",
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "created_by": {
        "type": "string",
        "format": "uuid"
      },
      "completed_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "revision": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "organization_id",
      "title",
      "requester",
      "due_on",
      "status",
      "source_format",
      "source_file_name",
      "source_size_bytes",
      "source_layout",
      "created_by",
      "completed_at",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
