general cleanup
This commit is contained in:
+18
-18
@@ -16,26 +16,26 @@ class Customer(db.Model):
|
||||
country_code = db.Column(db.String(3), nullable=False)
|
||||
created_at = db.Column(db.DateTime(timezone=True), server_default=func.now())
|
||||
updated_at = db.Column(db.DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
accounts = relationship(
|
||||
"Account",
|
||||
primaryjoin="Customer.id == Account.customer_id",
|
||||
foreign_keys="Account.customer_id",
|
||||
back_populates="customer",
|
||||
)
|
||||
# accounts = relationship(
|
||||
# # "Account",
|
||||
# # primaryjoin="Customer.id == Account.customer_id",
|
||||
# # foreign_keys="Account.customer_id",
|
||||
# # back_populates="customer",
|
||||
# # )
|
||||
|
||||
loans = relationship(
|
||||
"Loan",
|
||||
primaryjoin="Customer.id == Loan.customer_id",
|
||||
foreign_keys="Loan.customer_id",
|
||||
back_populates="customer",
|
||||
)
|
||||
# loans = relationship(
|
||||
# "Loan",
|
||||
# primaryjoin="Customer.id == Loan.customer_id",
|
||||
# foreign_keys="Loan.customer_id",
|
||||
# back_populates="customer",
|
||||
# )
|
||||
|
||||
transaction_offers = relationship(
|
||||
"TransactionOffer",
|
||||
primaryjoin="Customer.id == TransactionOffer.customer_id",
|
||||
foreign_keys="TransactionOffer.customer_id",
|
||||
back_populates="customer",
|
||||
)
|
||||
# transaction_offers = relationship(
|
||||
# "TransactionOffer",
|
||||
# primaryjoin="Customer.id == TransactionOffer.customer_id",
|
||||
# foreign_keys="TransactionOffer.customer_id",
|
||||
# back_populates="customer",
|
||||
# )
|
||||
|
||||
@classmethod
|
||||
def is_valid_customer(cls, customer_id):
|
||||
|
||||
Reference in New Issue
Block a user