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

class TCGPlayerGroup(Base):
    __tablename__ = "tcgplayer_groups"

    id = Column(Integer, primary_key=True, index=True)
    group_id = Column(Integer, unique=True, index=True)
    name = Column(String, nullable=False)
    abbreviation = Column(String)
    is_supplemental = Column(Boolean, default=False)
    published_on = Column(DateTime)
    modified_on = Column(DateTime)
    category_id = Column(Integer)
    created_at = Column(DateTime(timezone=True), server_default=func.now())
    updated_at = Column(DateTime(timezone=True), onupdate=func.now()) 