{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/test_risk_acceptances.schema.json",
  "title": "tables/test_risk_acceptances.json",
  "description": "The rows of the table test_risk_acceptances 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"
      },
      "risk_id": {
        "type": "string",
        "format": "uuid"
      },
      "state": {
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "rejected",
          "withdrawn"
        ]
      },
      "reason": {
        "type": "string"
      },
      "expires_on": {
        "type": "string",
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "requested_by": {
        "type": "string",
        "format": "uuid"
      },
      "requested_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "decided_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "decided_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "decision_note": {
        "type": [
          "string",
          "null"
        ]
      },
      "withdrawn_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "withdrawn_at": {
        "type": [
          "string",
          "null"
        ],
        "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",
      "test_key",
      "source_key",
      "resource_kind",
      "resource_id",
      "resource_label",
      "risk_id",
      "state",
      "reason",
      "expires_on",
      "requested_by",
      "requested_at",
      "decided_by",
      "decided_at",
      "decision_note",
      "withdrawn_by",
      "withdrawn_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
