Scope monitoring PF objects to Telegram-linked users

This commit is contained in:
Grendgi
2026-06-05 10:06:28 +03:00
parent 8bdac8b15b
commit ccfb261e7f
6 changed files with 213 additions and 79 deletions

View File

@@ -27,6 +27,7 @@ class Employee(Base):
id: Mapped[int] = mapped_column(Integer, primary_key=True)
name: Mapped[str] = mapped_column(String(200))
portal_user_id: Mapped[str | None] = mapped_column(String(100), unique=True, index=True, nullable=True)
tg_chat_id: Mapped[str | None] = mapped_column(String(64), unique=True, nullable=True)
tg_username: Mapped[str | None] = mapped_column(String(200), nullable=True)
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)