we are so back
This commit is contained in:
@ -252,6 +252,9 @@ class Vendor(Base):
|
||||
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
deleted_at = Column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
# Relationships
|
||||
transactions = relationship("Transaction", back_populates="vendors")
|
||||
|
||||
class Customer(Base):
|
||||
__tablename__ = "customers"
|
||||
|
||||
@ -260,6 +263,10 @@ class Customer(Base):
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
deleted_at = Column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
# Relationships
|
||||
transactions = relationship("Transaction", back_populates="customers")
|
||||
|
||||
class Transaction(Base):
|
||||
__tablename__ = "transactions"
|
||||
|
||||
@ -277,6 +284,9 @@ class Transaction(Base):
|
||||
|
||||
# Relationships
|
||||
transaction_items = relationship("TransactionItem", back_populates="transaction")
|
||||
vendors = relationship("Vendor", back_populates="transactions")
|
||||
customers = relationship("Customer", back_populates="transactions")
|
||||
marketplaces = relationship("Marketplace", back_populates="transactions")
|
||||
|
||||
class Marketplace(Base):
|
||||
__tablename__ = "marketplaces"
|
||||
@ -289,7 +299,7 @@ class Marketplace(Base):
|
||||
|
||||
# Relationships
|
||||
listings = relationship("MarketplaceListing", back_populates="marketplace")
|
||||
|
||||
transactions = relationship("Transaction", back_populates="marketplaces")
|
||||
class MarketplaceListing(Base):
|
||||
__tablename__ = "marketplace_listings"
|
||||
|
||||
|
Reference in New Issue
Block a user