From afea2cff79c682afad581a9216fc232a6c3cdd14 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 20 Apr 2021 16:19:40 +0200 Subject: [PATCH] adding confirmation model --- ereuse_devicehub/resources/action/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 855e8fc8..cc3cc3fc 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -1433,6 +1433,18 @@ class CancelReservation(Organize): """The act of cancelling a reservation.""" +class TradeNote(JoinedTableMixin, ActionWithMultipleDevices): + """Note add to one trade""" + trade_id = db.Column(UUID(as_uuid=True), + db.ForeignKey('trade.id'), + nullable=False) + trade = db.relationship('Trade', + backref=backref('notes', + uselist=True, + lazy=True), + primaryjoin='TradeNote.trade_id == Trade.id') + + class Confirm(JoinedTableMixin, ActionWithMultipleDevices): """Users confirm the offer and change it to trade""" user_id = db.Column(UUID(as_uuid=True),