Spaces:
Running on Zero
Running on Zero
Download app/db/models/group.py from cipher-attacks/Dbu-central-bot: direct link, hf CLI and curl.
- Browser
- Download file 675 Bytes
-
https://huggingface.co/spaces/cipher-attacks/Dbu-central-bot/resolve/main/app/db/models/group.py
- Command line
-
hf download hf://spaces/cipher-attacks/Dbu-central-bot/app/db/models/group.py
-
curl -L -o group.py https://huggingface.co/spaces/cipher-attacks/Dbu-central-bot/resolve/main/app/db/models/group.py
675 Bytes
| 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()) | |