from core.database import Base
from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, String


class Support_seats(Base):
    __tablename__ = "support_seats"
    __table_args__ = {"extend_existing": True}

    id = Column(Integer, primary_key=True, index=True, autoincrement=True, nullable=False)
    user_id = Column(String, nullable=True)
    display_name = Column(String, nullable=False)
    email = Column(String, nullable=False)
    role = Column(String, nullable=False)
    department_id = Column(Integer, nullable=True)
    status = Column(String, nullable=True)
    chat_limit = Column(Integer, nullable=True)
    working_hours = Column(String, nullable=True)
    permissions = Column(String, nullable=True)
    created_at = Column(DateTime(timezone=True), default=datetime.now)
    updated_at = Column(DateTime(timezone=True), default=datetime.now, onupdate=datetime.now)