{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/test_settings.schema.json",
  "title": "tables/test_settings.json",
  "description": "The rows of the table test_settings 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"
      },
      "test_key": {
        "type": "string"
      },
      "state": {
        "type": "string",
        "enum": [
          "on",
          "off"
        ]
      },
      "owner_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "deadline_days": {
        "type": [
          "integer",
          "null"
        ]
      },
      "counts_from": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "rule_version": {
        "type": [
          "string",
          "null"
        ]
      },
      "turned_on_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "turned_on_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "off_reason_code": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "not_used",
          "policy_differs",
          "duplicate",
          "other",
          null
        ]
      },
      "off_reason_text": {
        "type": [
          "string",
          "null"
        ]
      },
      "off_until": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "off_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "off_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "evidence_monthly_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "evidence_monthly_since": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "source_settings": {
        "type": [
          "object",
          "array",
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "parameters": {
        "type": [
          "object",
          "array",
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "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",
      "test_key",
      "state",
      "owner_membership_id",
      "deadline_days",
      "counts_from",
      "rule_version",
      "turned_on_by",
      "turned_on_at",
      "off_reason_code",
      "off_reason_text",
      "off_until",
      "off_by",
      "off_at",
      "evidence_monthly_by",
      "evidence_monthly_since",
      "source_settings",
      "parameters",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
