{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/internal_audits.schema.json",
  "title": "tables/internal_audits.json",
  "description": "The rows of the table internal_audits 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"
      },
      "objective": {
        "type": "string"
      },
      "scope_theme_ids": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "status": {
        "type": "string",
        "enum": [
          "planned",
          "in_progress",
          "reported"
        ]
      },
      "planned_on": {
        "type": "string",
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "performed_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "auditor_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "auditor_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "independence_note": {
        "type": [
          "string",
          "null"
        ]
      },
      "report_summary": {
        "type": [
          "string",
          "null"
        ]
      },
      "conclusion": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "conforms",
          "conforms_with_findings",
          "does_not_conform",
          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",
      "title",
      "objective",
      "scope_theme_ids",
      "status",
      "planned_on",
      "performed_on",
      "auditor_membership_id",
      "auditor_name",
      "independence_note",
      "report_summary",
      "conclusion",
      "created_by",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
