fixing shema and model
This commit is contained in:
parent
bbc22f4a53
commit
5df9c46f43
|
@ -1478,7 +1478,7 @@ class Offer(JoinedTableMixin, ActionWithMultipleDevices):
|
|||
user_to = db.relationship(User, primaryjoin=user_to_id == User.id)
|
||||
user_to_comment = """The user that gets the device due this deal."""
|
||||
price = Column(Float(decimal_return_scale=2), nullable=True)
|
||||
currency = Column(DBEnum(Currency), nullable=False, default='EUR')
|
||||
currency = Column(DBEnum(Currency), nullable=False, default=Currency.EUR.name)
|
||||
currency.comment = """The currency of this price as for ISO 4217."""
|
||||
date = Column(db.TIMESTAMP(timezone=True))
|
||||
document_id = Column(CIText())
|
||||
|
|
|
@ -458,9 +458,9 @@ class CancelReservation(Organize):
|
|||
|
||||
class Trade(ActionWithMultipleDevices):
|
||||
__doc__ = m.Trade.__doc__
|
||||
accepted_by_from = Boolean(missing=False, description=m.Offer.accepted_by_from.comment)
|
||||
accepted_by_to = Boolean(missing=False, description=m.Offer.accepted_by_to.comment)
|
||||
confirm_transfer = Boolean(missing=False, description=m.Offer.confirm_transfer.comment)
|
||||
accepted_by_from = Boolean(missing=False, description=m.Trade.accepted_by_from.comment)
|
||||
accepted_by_to = Boolean(missing=False, description=m.Trade.accepted_by_to.comment)
|
||||
confirm_transfer = Boolean(missing=False, description=m.Trade.confirm_transfer.comment)
|
||||
offer = NestedOn('Offer', dump_only=True)
|
||||
|
||||
|
||||
|
@ -491,7 +491,6 @@ class Offer(Trade):
|
|||
data['user_from_id'] = user_to.id
|
||||
|
||||
|
||||
|
||||
class InitTransfer(Trade):
|
||||
__doc__ = m.InitTransfer.__doc__
|
||||
|
||||
|
|
Reference in a new issue