Updated validation rule documentation
This commit is contained in:
parent
cd8c246d72
commit
cc724bdb30
@ -10,7 +10,8 @@ ___
|
|||||||
|
|
||||||
|Date|Edit|Author|
|
|Date|Edit|Author|
|
||||||
|--|--|--|
|
|--|--|--|
|
||||||
|2.2.24 | Document created, first draft | Daniel Schick |
|
| 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
|
## 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.
|
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:
|
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 |
|
| Field | Referenced table | Notes |
|
||||||
|-------|------------------|
|
|-------|------------------| ----- |
|
||||||
| ship_id | ship |
|
| ship_id | ship | |
|
||||||
| arrival_berth_id | berth |
|
| arrival_berth_id | berth | required if type is "arrival" (1) |
|
||||||
| departure_berth_id | berth |
|
| departure_berth_id | berth | required if type is "departure" or "shifting" (2 or 3) |
|
||||||
| participants | 1. participant_id values may appear more once 2. types may only appear once and must not include type "BSMD".|
|
| 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:
|
3. Check for reasonable values for the following fields:
|
||||||
|
|
||||||
@ -107,9 +107,11 @@ Usually the "Z" is missing at the end indicating local time.
|
|||||||
| recommended_tugs | 0 < value < 10 |
|
| recommended_tugs | 0 < value < 10 |
|
||||||
| canceled | may not be set on POST |
|
| canceled | may not be set on POST |
|
||||||
| evaluation | may not be set |
|
| evaluation | may not be set |
|
||||||
| evaluation_message | may not be set |
|
| evaluation_message | may not be set |
|
||||||
|
| created / modified | may not be set |
|
||||||
|
|
||||||
#### Required fields
|
#### Required fields
|
||||||
|
|
||||||
* eta / etd (depending on value of type: 1: eta, 2: etd, 3: both)
|
* eta / etd (depending on value of type: 1: eta, 2: etd, 3: both)
|
||||||
* type
|
* type
|
||||||
* ship_id
|
* ship_id
|
||||||
@ -156,32 +158,31 @@ This depends on the shipcall and participant type:
|
|||||||
|
|
||||||
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
||||||
|
|
||||||
eta_berth, shipcall_id, participant_id, participant_type
|
shipcall_id, participant_id, participant_type
|
||||||
|
|
||||||
TERMINAL:
|
TERMINAL:
|
||||||
|
|
||||||
operations_start, shipcall_id, participant_id, participant_type
|
shipcall_id, participant_id, participant_type
|
||||||
|
|
||||||
##### Outgoing
|
##### Outgoing
|
||||||
|
|
||||||
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
||||||
|
|
||||||
etd_berth, shipcall_id, participant_id, participant_type
|
shipcall_id, participant_id, participant_type
|
||||||
|
|
||||||
TERMINAL:
|
TERMINAL:
|
||||||
|
|
||||||
operations_end, shipcall_id, participant_id, participant_type
|
shipcall_id, participant_id, participant_type
|
||||||
|
|
||||||
##### Shifting
|
##### Shifting
|
||||||
|
|
||||||
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
|
||||||
|
|
||||||
eta_berth, etd_berth, shipcall_id, participant_id, participant_type
|
shipcall_id, participant_id, participant_type
|
||||||
|
|
||||||
TERMINAL:
|
TERMINAL:
|
||||||
|
|
||||||
operations_start, operations_end, shipcall_id, participant_id, participant_type
|
shipcall_id, participant_id, participant_type
|
||||||
|
|
||||||
|
|
||||||
## /times PUT
|
## /times PUT
|
||||||
|
|
||||||
@ -190,7 +191,7 @@ operations_start, operations_end, shipcall_id, participant_id, participant_type
|
|||||||
|
|
||||||
#### Required fields
|
#### 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
|
## /times DELETE
|
||||||
|
|
||||||
@ -219,7 +220,6 @@ The id field is required, missing fields will not be updated.
|
|||||||
3. See value rules in /ship POST
|
3. See value rules in /ship POST
|
||||||
4. The id field is required, missing fields will not be updated
|
4. The id field is required, missing fields will not be updated
|
||||||
|
|
||||||
|
|
||||||
## /ship DELETE
|
## /ship DELETE
|
||||||
|
|
||||||
1. The call may only be performed by a user belonging to participant group type BSMD.
|
1. The call may only be performed by a user belonging to participant group type BSMD.
|
||||||
|
|||||||
Reference in New Issue
Block a user