split up ata_atd in two separate fields ata and atd
This commit is contained in:
parent
11f72b370d
commit
d42b3753e7
1432
misc/BreCalApi.cs
1432
misc/BreCalApi.cs
File diff suppressed because it is too large
Load Diff
@ -664,7 +664,12 @@ components:
|
||||
nullable: true
|
||||
participant_type:
|
||||
type: integer
|
||||
ata_atd:
|
||||
ata:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
description: can be set by mooring if actual times are different from planned
|
||||
atd:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
|
||||
@ -86,8 +86,9 @@ ADD CONSTRAINT `FK_HISTORY_USER`
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION;
|
||||
|
||||
-- add ata_atd field to times
|
||||
-- add additional fields to times
|
||||
|
||||
ALTER TABLE `bremen_calling_devel`.`times`
|
||||
ADD COLUMN `ata_atd` DATETIME NULL DEFAULT NULL COMMENT 'Relevant only for mooring, this field can be used to record actual ATA / ATD' AFTER `participant_type`,
|
||||
ADD COLUMN `interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `ata_atd`;
|
||||
ADD COLUMN `ata` DATETIME NULL DEFAULT NULL COMMENT 'Relevant only for mooring, this field can be used to record actual ATA' AFTER `participant_type`,
|
||||
ADD COLUMN `atd` DATETIME NULL DEFAULT NULL COMMENT 'Relevant only for mooring, this field can be used to record actual ATD' AFTER `ata`,
|
||||
ADD COLUMN `interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `atd`;
|
||||
@ -22,7 +22,7 @@ def GetTimes(options):
|
||||
commands = pydapper.using(pooledConnection)
|
||||
data = commands.query("SELECT id, eta_berth, eta_berth_fixed, etd_berth, etd_berth_fixed, lock_time, lock_time_fixed, " +
|
||||
"zone_entry, zone_entry_fixed, operations_start, operations_end, remarks, shipcall_id, participant_id, " +
|
||||
"berth_id, berth_info, pier_side, participant_type, created, modified, ata_atd, interval_end FROM times " +
|
||||
"berth_id, berth_info, pier_side, participant_type, created, modified, ata, atd, interval_end FROM times " +
|
||||
"WHERE times.shipcall_id = ?scid?", model=model.Times, param={"scid" : options["shipcall_id"]})
|
||||
pooledConnection.close()
|
||||
|
||||
|
||||
@ -305,7 +305,8 @@ class TimesSchema(Schema):
|
||||
pier_side = fields.Bool(Required = False, allow_none = True)
|
||||
shipcall_id = fields.Int(Required = True)
|
||||
participant_type = fields.Int(Required = False, allow_none=True)
|
||||
ata_atd = fields.DateTime(Required = False, allow_none=True)
|
||||
ata = fields.DateTime(Required = False, allow_none=True)
|
||||
atd = fields.DateTime(Required = False, allow_none=True)
|
||||
interval_end = fields.DateTime(Required = False, allow_none=True)
|
||||
created = fields.DateTime(Required = False, allow_none=True)
|
||||
modified = fields.DateTime(Required = False, allow_none=True)
|
||||
@ -344,7 +345,8 @@ class Times:
|
||||
pier_side: bool
|
||||
participant_type: int
|
||||
shipcall_id: int
|
||||
ata_atd: datetime
|
||||
ata: datetime
|
||||
atd: datetime
|
||||
interval_end: datetime
|
||||
created: datetime
|
||||
modified: datetime
|
||||
|
||||
Reference in New Issue
Block a user