{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://poseidat.org/schema/entry/zone-exit.json",
  "description": "Exit declaration of a fishing zone",
  "title": "ZoneExit",
  "properties": {
    "entry_type": {
      "description": "The journal entry type identifier",
      "type": "string",
      "enum": [
        "zone-exit"
      ],
      "default": "zone-exit"
    },
    "activity_date": {
      "description": "The datetime of the arrival in UTC. GBR: DATI, NLD2: DA + TI, NLD3: DA",
      "type": "string",
      "format": "date-time"
    },
    "zone": {
      "description": "The zone being entered",
      "$ref": "https://poseidat.org/schema/core/fishing-zone.json"
    },
    "location": {
      "description": "The geographical location where the entry took place",
      "$ref": "https://poseidat.org/schema/core/measurement/position.json"
    },
    "catch_on_board": {
      "description": "The previously caught fish present on the vessel at the time of entry",
      "title": "Catch on board",
      "items": {
        "$ref": "https://poseidat.org/schema/core/fishing-catch.json"
      },
      "type": "array"
    },
    "target_species": {
      "description": "An indication of the target species for the fishing activity. Only GBR: TS",
      "type": "string"
    },
    "effort_zone": {
      "description": "The fishing effort zone. Example: A (ICES V-VI). GBR: GBRFE",
      "$ref": "https://poseidat.org/schema/enum/effort-zone.json"
    },
    "trans_zonal_fishing": {
      "description": "Indicates the vessel has engaged in trans-zonal fishing: GRB: GBRTRZ",
      "type": "boolean"
    },
    "trans_zonal_fishing_zones": {
      "description": "The zones involved in trans-zonal fishing. NLD: NLTRZ",
      "title": "Trans zonal fishing areas",
      "items": {
        "$ref": "https://poseidat.org/schema/core/fishing-zone.json"
      },
      "type": "array"
    }
  },
  "required": [
    "entry_type",
    "activity_date",
    "location",
    "zone"
  ],
  "allOf": [
    { "$ref": "https://poseidat.org/schema/core/base-entry.json" }
  ],
  "type": "object",
  "additionalProperties": true
}
