we are so back

This commit is contained in:
2025-05-05 14:05:12 -04:00
parent 11aa4cda16
commit 5c85411c69
20 changed files with 2417 additions and 33 deletions

View File

@ -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"