{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/test_findings.schema.json",
  "title": "tables/test_findings.json",
  "description": "The rows of the table test_findings 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"
      },
      "test_key": {
        "type": "string"
      },
      "source_key": {
        "type": "string"
      },
      "resource_kind": {
        "type": "string",
        "enum": [
          "account",
          "device",
          "vulnerability",
          "person",
          "access_system",
          "evidence",
          "incident",
          "ai_system",
          "connector",
          "pentest_engagement"
        ]
      },
      "resource_id": {
        "type": "string",
        "format": "uuid"
      },
      "resource_label": {
        "type": "string"
      },
      "observed": {
        "type": [
          "object",
          "array",
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "opened_on": {
        "type": "string",
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "due_on": {
        "type": "string",
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "overdue_confirmed_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "closed_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "close_reason": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "fixed",
          "gone",
          "excluded",
          "switched_off",
          null
        ]
      },
      "last_run_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "extended_due_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "extended_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "extended_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "extension_reason": {
        "type": [
          "string",
          "null"
        ]
      },
      "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$"
      }
    },
    "required": [
      "id",
      "organization_id",
      "test_key",
      "source_key",
      "resource_kind",
      "resource_id",
      "resource_label",
      "observed",
      "opened_on",
      "due_on",
      "overdue_confirmed_on",
      "closed_on",
      "close_reason",
      "last_run_id",
      "extended_due_on",
      "extended_by",
      "extended_at",
      "extension_reason",
      "created_at",
      "updated_at"
    ],
    "additionalProperties": false
  }
}
