mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-25 07:14:18 +00:00
Add a "transactions" backref to User
This commit is contained in:
parent
3e49f7c8a5
commit
7f4087e046
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ class Transaction(TableDeclarativeBase):
|
|||
transaction_id = Column(Integer, primary_key=True)
|
||||
# The user whose credit is affected by this transaction
|
||||
user_id = Column(BigInteger, ForeignKey("users.user_id"), nullable=False)
|
||||
user = relationship("User")
|
||||
user = relationship("User", backref=backref("transactions"))
|
||||
# The value of this transaction. Can be both negative and positive.
|
||||
value = Column(Integer, nullable=False)
|
||||
# Refunded status: if True, ignore the value of this transaction when recalculating
|
||||
|
|
Loading…
Reference in a new issue