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

class CriticalErrorLog(Base):
    __tablename__ = "critical_error_logs"

    id = Column(Integer, primary_key=True, index=True)
    error_message = Column(String, nullable=False)
    created_at = Column(DateTime(timezone=True), server_default=func.now())
    updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
