{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/suppliers.schema.json",
  "title": "tables/suppliers.json",
  "description": "The rows of the table suppliers 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"
      },
      "name": {
        "type": "string"
      },
      "service": {
        "type": "string"
      },
      "data_access": {
        "type": "string"
      },
      "criticality": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "status": {
        "type": "string",
        "enum": [
          "active",
          "archived"
        ]
      },
      "owner_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "clause_confidentiality": {
        "type": "boolean"
      },
      "clause_incident_reporting": {
        "type": "boolean"
      },
      "clause_subcontractors": {
        "type": "boolean"
      },
      "clause_right_to_audit": {
        "type": "boolean"
      },
      "clause_data_return": {
        "type": "boolean"
      },
      "last_reviewed_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "last_review_outcome": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "accepted",
          "accepted_with_actions",
          "rejected",
          null
        ]
      },
      "last_review_evidence": {
        "type": [
          "string",
          "null"
        ]
      },
      "review_due_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "shared_responsibility": {
        "type": [
          "string",
          "null"
        ]
      },
      "exit_plan": {
        "type": [
          "string",
          "null"
        ]
      },
      "notes": {
        "type": [
          "string",
          "null"
        ]
      },
      "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"
      }
    },
    "required": [
      "id",
      "organization_id",
      "name",
      "service",
      "data_access",
      "criticality",
      "status",
      "owner_membership_id",
      "clause_confidentiality",
      "clause_incident_reporting",
      "clause_subcontractors",
      "clause_right_to_audit",
      "clause_data_return",
      "last_reviewed_on",
      "last_review_outcome",
      "last_review_evidence",
      "review_due_on",
      "shared_responsibility",
      "exit_plan",
      "notes",
      "created_by",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
