{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/evidence_items.schema.json",
  "title": "tables/evidence_items.json",
  "description": "The rows of the table evidence_items 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"
      },
      "description": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "enum": [
          "file",
          "link"
        ]
      },
      "file_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "mime_type": {
        "type": [
          "string",
          "null"
        ]
      },
      "size_bytes": {
        "type": [
          "integer",
          "null"
        ]
      },
      "sha256": {
        "type": [
          "string",
          "null"
        ]
      },
      "url": {
        "type": [
          "string",
          "null"
        ]
      },
      "sensitivity": {
        "type": "string",
        "enum": [
          "internal",
          "confidential",
          "restricted"
        ]
      },
      "collected_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "period_start": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "period_end": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "valid_until": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "freshness_days": {
        "type": [
          "integer",
          "null"
        ]
      },
      "owner_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "review_status": {
        "type": "string",
        "enum": [
          "pending",
          "accepted",
          "rejected"
        ]
      },
      "reviewed_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "reviewed_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "review_note": {
        "type": [
          "string",
          "null"
        ]
      },
      "scan_status": {
        "type": "string",
        "enum": [
          "pending",
          "clean",
          "infected",
          "not_scanned"
        ]
      },
      "source_provider": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "google_drive",
          "sharepoint",
          "confluence",
          "notion",
          "dropbox",
          "box",
          null
        ]
      },
      "source_file_id": {
        "type": [
          "string",
          "null"
        ]
      },
      "source_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "source_modified_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "source_checksum": {
        "type": [
          "string",
          "null"
        ]
      },
      "source_state": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "present",
          "changed",
          "missing",
          "unreadable",
          null
        ]
      },
      "source_checked_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "origin": {
        "type": "string",
        "enum": [
          "person",
          "system"
        ]
      },
      "created_by": {
        "type": "string",
        "format": "uuid"
      },
      "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"
      },
      "deleted_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      }
    },
    "required": [
      "id",
      "organization_id",
      "title",
      "description",
      "kind",
      "file_name",
      "mime_type",
      "size_bytes",
      "sha256",
      "url",
      "sensitivity",
      "collected_on",
      "period_start",
      "period_end",
      "valid_until",
      "freshness_days",
      "owner_membership_id",
      "review_status",
      "reviewed_by",
      "reviewed_at",
      "review_note",
      "scan_status",
      "source_provider",
      "source_file_id",
      "source_name",
      "source_modified_at",
      "source_checksum",
      "source_state",
      "source_checked_at",
      "origin",
      "created_by",
      "created_at",
      "updated_at",
      "revision",
      "deleted_at"
    ],
    "additionalProperties": false
  }
}
