added berth in database and API
This commit is contained in:
parent
b5c7a35e3d
commit
06b1fda4a0
@ -23,6 +23,8 @@ CREATE TABLE `ship` (
|
|||||||
CREATE TABLE `shipcall` (
|
CREATE TABLE `shipcall` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`ship_id` int(11) DEFAULT NULL,
|
`ship_id` int(11) DEFAULT NULL,
|
||||||
|
`arrival_berth_id` int(11) DEFAULT NULL,
|
||||||
|
`departure_berth_id` int(11) DEFAULT NULL,
|
||||||
`type` tinyint(4) DEFAULT NULL,
|
`type` tinyint(4) DEFAULT NULL,
|
||||||
`eta` datetime DEFAULT NULL,
|
`eta` datetime DEFAULT NULL,
|
||||||
`voyage` varchar(16) DEFAULT NULL,
|
`voyage` varchar(16) DEFAULT NULL,
|
||||||
@ -66,3 +68,10 @@ CREATE TABLE `participant` (
|
|||||||
`flags` int(10) unsigned DEFAULT NULL,
|
`flags` int(10) unsigned DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='An organization taking part';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='An organization taking part';
|
||||||
|
|
||||||
|
CREATE TABLE `berth` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name1` varchar(128) DEFAULT NULL,
|
||||||
|
`name2` varchar(128) DEFAULT NULL,
|
||||||
|
PRIMARY KEY(`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Place of ship for a ship call';
|
||||||
|
|||||||
@ -240,7 +240,24 @@ paths:
|
|||||||
$ref: '#/components/responses/500'
|
$ref: '#/components/responses/500'
|
||||||
503:
|
503:
|
||||||
$ref: '#/components/responses/503'
|
$ref: '#/components/responses/503'
|
||||||
|
/berths:
|
||||||
|
get:
|
||||||
|
summary: Gets a list of all berths registered
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: list of berths
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/berth_list'
|
||||||
|
400:
|
||||||
|
$ref: '#/components/responses/400'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
|
500:
|
||||||
|
$ref: '#/components/responses/500'
|
||||||
|
503:
|
||||||
|
$ref: '#/components/responses/503'
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
timesId:
|
timesId:
|
||||||
@ -310,6 +327,22 @@ components:
|
|||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/times'
|
$ref: '#/components/schemas/times'
|
||||||
|
|
||||||
|
berth:
|
||||||
|
type: object
|
||||||
|
description: Ship berth used for a ship call
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name1:
|
||||||
|
type: string
|
||||||
|
name2:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
berth_list:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/berth'
|
||||||
|
|
||||||
notification:
|
notification:
|
||||||
type: object
|
type: object
|
||||||
description: a notification created by the engine if a times entry violates a rule
|
description: a notification created by the engine if a times entry violates a rule
|
||||||
|
|||||||
Reference in New Issue
Block a user