{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://search.sukuux.com/data/registry/schemas/entity.schema.json",
  "title": "Sukuu Search Ghana National Entity",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "id",
    "entity_type",
    "name",
    "country_code",
    "record_status",
    "provenance"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "entity_type": {
      "type": "string",
      "enum": [
        "school",
        "tertiary_institution",
        "tvet_provider",
        "programme",
        "qualification",
        "learning_resource",
        "scholarship",
        "opportunity",
        "library",
        "education_office",
        "health_facility",
        "ambulance_station",
        "police_station",
        "financial_institution",
        "region",
        "district",
        "locality",
        "digital_address",
        "indicator",
        "other",
        "business",
        "company",
        "organization",
        "ngo",
        "government_agency",
        "government_office",
        "service_provider",
        "place",
        "point_of_interest",
        "transport_operator",
        "transport_terminal",
        "utility_provider",
        "emergency_service",
        "tourism_site",
        "cultural_site",
        "job",
        "event"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "alternate_names": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "country_code": {
      "const": "GH"
    },
    "record_status": {
      "type": "string",
      "enum": [
        "active",
        "inactive",
        "expired",
        "closed",
        "unknown",
        "superseded"
      ]
    },
    "identifiers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "scheme",
          "value"
        ],
        "properties": {
          "scheme": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "issuer": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "classifications": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "scheme",
          "value"
        ],
        "properties": {
          "scheme": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "geography": {
      "$ref": "https://search.sukuux.com/data/registry/schemas/geography.schema.json"
    },
    "contacts": {
      "type": "object",
      "properties": {
        "phone": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "email": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "website": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "digital_address": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "relationships": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "predicate",
          "target_id"
        ],
        "properties": {
          "predicate": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "target_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid_from": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "valid_to": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      }
    },
    "attributes": {
      "type": "object"
    },
    "provenance": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "https://search.sukuux.com/data/registry/schemas/provenance.schema.json"
      }
    }
  }
}
