adding confirmation model

This commit is contained in:
Cayo Puigdefabregas 2021-04-20 16:19:40 +02:00
parent aaafb2a5fa
commit afea2cff79
1 changed files with 12 additions and 0 deletions

View File

@ -1433,6 +1433,18 @@ class CancelReservation(Organize):
"""The act of cancelling a reservation.""" """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): class Confirm(JoinedTableMixin, ActionWithMultipleDevices):
"""Users confirm the offer and change it to trade""" """Users confirm the offer and change it to trade"""
user_id = db.Column(UUID(as_uuid=True), user_id = db.Column(UUID(as_uuid=True),