Updated validation rule documentation
This commit is contained in:
parent
cd8c246d72
commit
cc724bdb30
@ -11,6 +11,7 @@ ___
|
||||
|Date|Edit|Author|
|
||||
|--|--|--|
|
||||
| 2.2.24 | Document created, first draft | Daniel Schick |
|
||||
| 25.7.24 | Update for BC 1.4 and other changes | Daniel Schick |
|
||||
|
||||
## Global constants and definitions
|
||||
|
||||
@ -84,13 +85,12 @@ Usually the "Z" is missing at the end indicating local time.
|
||||
|
||||
1. The call may only be performed by a user belonging to participant group type BSMD.
|
||||
2. Reference checking: The dataset includes multiple fields referring other tables. The validation must make sure the referenced entities exist. This includes the following fields:
|
||||
| Field | Referenced table |
|
||||
|-------|------------------|
|
||||
| ship_id | ship |
|
||||
| arrival_berth_id | berth |
|
||||
| departure_berth_id | berth |
|
||||
| participants | 1. participant_id values may appear more once 2. types may only appear once and must not include type "BSMD".|
|
||||
|
||||
| Field | Referenced table | Notes |
|
||||
|-------|------------------| ----- |
|
||||
| ship_id | ship | |
|
||||
| arrival_berth_id | berth | required if type is "arrival" (1) |
|
||||
| departure_berth_id | berth | required if type is "departure" or "shifting" (2 or 3) |
|
||||
| participants | participant | This is a list containing participant_id and type pairs with the following rules: 1. participant_id values may appear more once 2. types may only appear once, therefore there are a maximum of 7 elements in this list. |
|
||||
|
||||
3. Check for reasonable values for the following fields:
|
||||
|
||||
@ -108,8 +108,10 @@ Usually the "Z" is missing at the end indicating local time.
|
||||
| canceled | may not be set on POST |
|
||||
| evaluation | may not be set |
|
||||
| evaluation_message | may not be set |
|
||||
| created / modified | may not be set |
|
||||
|
||||
#### Required fields
|
||||
|
||||
* eta / etd (depending on value of type: 1: eta, 2: etd, 3: both)
|
||||
* type
|
||||
* ship_id
|
||||
@ -156,32 +158,31 @@ This depends on the shipcall and participant type:
|
||||
|
||||
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
||||
|
||||
eta_berth, shipcall_id, participant_id, participant_type
|
||||
shipcall_id, participant_id, participant_type
|
||||
|
||||
TERMINAL:
|
||||
|
||||
operations_start, shipcall_id, participant_id, participant_type
|
||||
shipcall_id, participant_id, participant_type
|
||||
|
||||
##### Outgoing
|
||||
|
||||
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
||||
|
||||
etd_berth, shipcall_id, participant_id, participant_type
|
||||
shipcall_id, participant_id, participant_type
|
||||
|
||||
TERMINAL:
|
||||
|
||||
operations_end, shipcall_id, participant_id, participant_type
|
||||
shipcall_id, participant_id, participant_type
|
||||
|
||||
##### Shifting
|
||||
|
||||
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
||||
|
||||
eta_berth, etd_berth, shipcall_id, participant_id, participant_type
|
||||
shipcall_id, participant_id, participant_type
|
||||
|
||||
TERMINAL:
|
||||
|
||||
operations_start, operations_end, shipcall_id, participant_id, participant_type
|
||||
|
||||
shipcall_id, participant_id, participant_type
|
||||
|
||||
## /times PUT
|
||||
|
||||
@ -190,7 +191,7 @@ operations_start, operations_end, shipcall_id, participant_id, participant_type
|
||||
|
||||
#### Required fields
|
||||
|
||||
The id field is required, missing fields will not be updated.
|
||||
The id field is required, missing fields will not be updated
|
||||
|
||||
## /times DELETE
|
||||
|
||||
@ -219,7 +220,6 @@ The id field is required, missing fields will not be updated.
|
||||
3. See value rules in /ship POST
|
||||
4. The id field is required, missing fields will not be updated
|
||||
|
||||
|
||||
## /ship DELETE
|
||||
|
||||
1. The call may only be performed by a user belonging to participant group type BSMD.
|
||||
|
||||
Reference in New Issue
Block a user