{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/ai_systems.schema.json",
  "title": "tables/ai_systems.json",
  "description": "The rows of the table ai_systems 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"
      },
      "purpose": {
        "type": "string"
      },
      "owner_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "sourcing": {
        "type": "string",
        "enum": [
          "in_house",
          "third_party",
          "combined"
        ]
      },
      "provider_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "kind": {
        "type": "string",
        "enum": [
          "generative",
          "classification",
          "prediction",
          "recommendation",
          "computer_vision",
          "speech_language",
          "agent",
          "rule_based",
          "other"
        ]
      },
      "model_description": {
        "type": [
          "string",
          "null"
        ]
      },
      "data_categories": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "deployment_status": {
        "type": "string",
        "enum": [
          "planned",
          "in_development",
          "in_testing",
          "in_use",
          "retired"
        ]
      },
      "risk_level": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "low",
          "medium",
          "high",
          "critical",
          null
        ]
      },
      "impact_assessment_ref": {
        "type": [
          "string",
          "null"
        ]
      },
      "human_oversight": {
        "type": [
          "string",
          "null"
        ]
      },
      "ai_act_roles": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "ai_act_rationale": {
        "type": [
          "string",
          "null"
        ]
      },
      "last_reviewed_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "review_due_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "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",
      "purpose",
      "owner_membership_id",
      "sourcing",
      "provider_name",
      "kind",
      "model_description",
      "data_categories",
      "deployment_status",
      "risk_level",
      "impact_assessment_ref",
      "human_oversight",
      "ai_act_roles",
      "ai_act_rationale",
      "last_reviewed_on",
      "review_due_on",
      "notes",
      "created_by",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
