{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/actions.schema.json",
  "title": "tables/actions.json",
  "description": "The rows of the table actions 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"
      },
      "status": {
        "type": "string",
        "enum": [
          "open",
          "in_progress",
          "blocked",
          "done",
          "cancelled"
        ]
      },
      "priority": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "due_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "owner_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "source_type": {
        "type": "string",
        "enum": [
          "assessment_question",
          "assessment_clarification",
          "risk",
          "nonconformity",
          "management_review",
          "improvement",
          "vulnerability",
          "automated_test",
          "manual"
        ]
      },
      "source_ref": {
        "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$"
      },
      "completed_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "completed_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "external_system": {
        "type": [
          "string",
          "null"
        ]
      },
      "external_ref": {
        "type": [
          "string",
          "null"
        ]
      },
      "external_url": {
        "type": [
          "string",
          "null"
        ]
      },
      "external_state": {
        "type": [
          "string",
          "null"
        ]
      },
      "external_synced_at": {
        "type": [
          "string",
          "null"
        ],
        "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",
      "description",
      "status",
      "priority",
      "due_on",
      "owner_membership_id",
      "source_type",
      "source_ref",
      "created_by",
      "created_at",
      "updated_at",
      "completed_at",
      "completed_by",
      "external_system",
      "external_ref",
      "external_url",
      "external_state",
      "external_synced_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
