{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/evidence_requests.schema.json",
  "title": "tables/evidence_requests.json",
  "description": "The rows of the table evidence_requests 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"
      },
      "detail": {
        "type": "string"
      },
      "target_type": {
        "type": "string",
        "enum": [
          "assessment_question",
          "action",
          "risk",
          "document",
          "pentest_engagement"
        ]
      },
      "target_id": {
        "type": "string"
      },
      "requested_by": {
        "type": "string",
        "format": "uuid"
      },
      "assignee_membership_id": {
        "type": "string",
        "format": "uuid"
      },
      "due_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "status": {
        "type": "string",
        "enum": [
          "open",
          "submitted",
          "cancelled"
        ]
      },
      "evidence_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "submitted_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "cancelled_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",
      "detail",
      "target_type",
      "target_id",
      "requested_by",
      "assignee_membership_id",
      "due_on",
      "status",
      "evidence_id",
      "submitted_at",
      "cancelled_at",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
