QC check
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import Column, DateTime
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class TimestampMixin:
|
||||
"""Mixin to add created_at and updated_at timestamps to models"""
|
||||
|
||||
created_at = Column(DateTime, default=datetime.utcnow, nullable=False)
|
||||
updated_at = Column(
|
||||
DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False
|
||||
|
||||
@@ -85,4 +85,3 @@ class Product(Base):
|
||||
f"<Product(product_id='{self.product_id}', title='{self.title}', marketplace='{self.marketplace}', "
|
||||
f"shop='{self.shop_name}')>"
|
||||
)
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ class Shop(Base):
|
||||
"MarketplaceImportJob", back_populates="shop"
|
||||
)
|
||||
|
||||
|
||||
class ShopProduct(Base):
|
||||
__tablename__ = "shop_products"
|
||||
|
||||
@@ -81,4 +82,3 @@ class ShopProduct(Base):
|
||||
Index("idx_shop_product_active", "shop_id", "is_active"),
|
||||
Index("idx_shop_product_featured", "shop_id", "is_featured"),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user