git_brcal/src/server/BreCal/schemas/model.py

80 lines
1.3 KiB
Python

from marshmallow import Schema, fields
class Berth(Schema):
id = fields.Int()
name1 = fields.String()
name2 = fields.String()
class Error(Schema):
message = fields.String(required=True,)
class GetVerifyInlineResp(Schema):
pass
class Notification(Schema):
acknowledged = fields.Boolean()
id = fields.Int()
notification_type = fields.String()
participant_id = fields.Int()
times_id = fields.Int()
timestamp = fields.DateTime()
class Participant(Schema):
city = fields.String()
id = fields.Int()
name = fields.String()
postal_code = fields.String(data_key="postal code",)
street = fields.String()
class Shipcall(Schema):
description = fields.String()
id = fields.Raw(required=True,)
type = fields.String(required=True,)
class ShipcallId(Schema):
pass
class Times(Schema):
duration_planned = fields.Int()
end_actual = fields.DateTime()
end_planned = fields.DateTime()
id = fields.Int()
participant_id = fields.Int(required=True,)
shipcall_id = fields.Int(required=True,)
start_actual = fields.DateTime()
start_planned = fields.DateTime()
class TimesId(Schema):
pass
class BerthList(Berth):
pass
class NotificationList(Notification):
pass
class Shipcalls(Shipcall):
pass
class TimesList(Times):
pass