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),