Spaces:
Running on Zero
Running on Zero
File size: 675 Bytes
c3b9247 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from datetime import datetime
from typing import Optional
from sqlalchemy import BigInteger, Boolean, DateTime, String, func
from sqlalchemy.orm import Mapped, mapped_column
from app.db.base import Base
class BotGroup(Base):
"""A class/department group the bot was added to (every member of it can see the bot)."""
__tablename__ = "bot_groups"
chat_id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=False)
title: Mapped[Optional[str]] = mapped_column(String(128))
active: Mapped[bool] = mapped_column(Boolean, default=True)
added_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
|