from sqlalchemy import Column, Integer, String, Float, DateTime
from sqlalchemy.sql import func
from app.db.database import Base

class Inventory(Base):
    __tablename__ = "inventory"

    id = Column(Integer, primary_key=True, index=True)
    tcgplayer_id = Column(String, unique=True, index=True)
    product_line = Column(String)
    set_name = Column(String)
    product_name = Column(String)
    title = Column(String)
    number = Column(String)
    rarity = Column(String)
    condition = Column(String)
    tcg_market_price = Column(Float)
    tcg_direct_low = Column(Float)
    tcg_low_price_with_shipping = Column(Float)
    tcg_low_price = Column(Float)
    total_quantity = Column(Integer)
    add_to_quantity = Column(Integer)
    tcg_marketplace_price = Column(Float)
    photo_url = Column(String)
    
    # Timestamps
    created_at = Column(DateTime(timezone=True), server_default=func.now())
    updated_at = Column(DateTime(timezone=True), onupdate=func.now()) 