{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Evidence Item",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "evidence_id",
    "case_id",
    "origin_type",
    "captured_at",
    "provenance",
    "content_ref"
  ],
  "properties": {
    "evidence_id": {
      "type": "string"
    },
    "case_id": {
      "type": "string"
    },
    "origin_type": {
      "enum": [
        "FARMER_REPORT",
        "IMAGE",
        "VIDEO_FRAME",
        "AUDIO",
        "FIELD_RECORD",
        "ENVIRONMENT_API",
        "LOCAL_DOCUMENT",
        "EXTERNAL_RESEARCH",
        "REVIEWER"
      ]
    },
    "captured_at": {
      "type": "string",
      "format": "date-time"
    },
    "content_ref": {
      "type": "string"
    },
    "provenance": {
      "type": "object",
      "required": [
        "source_id"
      ],
      "properties": {
        "source_id": {
          "type": "string"
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        },
        "authority": {
          "type": [
            "string",
            "null"
          ]
        },
        "retrieved_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "hash": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "geography": {
      "type": [
        "object",
        "null"
      ]
    },
    "time_applicability": {
      "type": [
        "object",
        "null"
      ]
    },
    "quality": {
      "type": "object"
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}