{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/incidents.schema.json",
  "title": "tables/incidents.json",
  "description": "The rows of the table incidents 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"
      },
      "number": {
        "type": "integer"
      },
      "title": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "category": {
        "type": "string",
        "enum": [
          "malware",
          "phishing",
          "unauthorized_access",
          "data_loss",
          "availability",
          "misconfiguration",
          "physical",
          "supplier",
          "other"
        ]
      },
      "severity": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high",
          "critical"
        ]
      },
      "status": {
        "type": "string",
        "enum": [
          "reported",
          "triaged",
          "contained",
          "closed"
        ]
      },
      "occurred_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "aware_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "reported_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "reported_by": {
        "type": "string",
        "format": "uuid"
      },
      "owner_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "triaged_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "contained_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "containment_note": {
        "type": [
          "string",
          "null"
        ]
      },
      "closed_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "root_cause": {
        "type": [
          "string",
          "null"
        ]
      },
      "lessons_learned": {
        "type": [
          "string",
          "null"
        ]
      },
      "significant": {
        "type": "boolean"
      },
      "personal_data_breach": {
        "type": "boolean"
      },
      "classification_note": {
        "type": [
          "string",
          "null"
        ]
      },
      "classified_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "classified_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "reopen_count": {
        "type": "integer"
      },
      "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",
      "number",
      "title",
      "description",
      "category",
      "severity",
      "status",
      "occurred_at",
      "aware_at",
      "reported_at",
      "reported_by",
      "owner_membership_id",
      "triaged_at",
      "contained_at",
      "containment_note",
      "closed_at",
      "root_cause",
      "lessons_learned",
      "significant",
      "personal_data_breach",
      "classification_note",
      "classified_at",
      "classified_by",
      "reopen_count",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
