from sqlalchemy import Column, Integer, String, DateTime, Text, Boolean
from datetime import datetime
from config.database import Base

class Information(Base):
    __tablename__ = "informations"
    
    id = Column(Integer, primary_key=True, index=True)
    title = Column(String, nullable=False)
    content = Column(Text, nullable=False)
    category = Column(String, default="general")  # general, release, upcoming, etc.
    is_published = Column(Boolean, default=True)
    priority = Column(Integer, default=0)  # Pour l'ordre d'affichage
    created_at = Column(DateTime, default=datetime.utcnow)
    updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
