{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://poseidat.org/schema/entry/arrival.json",
  "title": "Arrival",
  "description": "A return to port event",
  "properties": {
    "entry_type": {
      "description": "The journal entry type identifier",
      "type": "string",
      "enum": [
        "arrival"
      ],
      "default": "arrival"
    },
    "trip": {
      "description": "Trip related details for this  entry",
      "$ref": "https://poseidat.org/schema/core/trip-entry.json"
    },
    "activity_date": {
      "description": "The datetime of the arrival in UTC. GBR: DATI, NLD2: DA + TI, NLD3: DA",
      "type": "string",
      "format": "date-time"
    },
    "port": {
      "description": "The code of the port of arrival. These are 5 letter codes prefixed with a 2 letter country code and a 3 letter port identifier. Example: NLURK, BEANR",
      "$ref": "https://poseidat.org/schema/core/port.json"
    },
    "reason_arrival": {
      "description": "The reason for the vessel to return to port. Please check the wiki for the meaning of these codes.",
      "$ref": "https://poseidat.org/schema/enum/reason-arrival.json"
    },
    "catch_on_board": {
      "description": "The caught fish present on board the vessel",
      "title": "Catch on board",
      "items": {
        "$ref": "https://poseidat.org/schema/core/fishing-catch.json"
      },
      "type": "array"
    }
  },
  "required": [
    "entry_type",
    "trip",
    "activity_date",
    "port",
    "reason_arrival"
  ],
  "allOf": [
    { "$ref": "https://poseidat.org/schema/core/base-entry.json" }
  ],
  "type": "object",
  "additionalProperties": true
}
