1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-17 01:06:18 +00:00

ban\unban commands

This commit is contained in:
mihalin
2022-01-18 23:28:03 +03:00
parent 59b73c33dc
commit 363391b575
4 changed files with 41 additions and 8 deletions

View File

@@ -72,3 +72,14 @@ class GroupChat(Model):
class Meta:
table = 'group_chat'
class BannedUser(Model):
id = fields.BigIntField(pk=True)
telegram_id = fields.BigIntField(index=True)
username = fields.CharField(max_length=100, default=None, null=True)
bot = fields.ForeignKeyField("models.Bot", related_name="banned_users", on_delete=fields.relational.CASCADE)
class Meta:
table = "bot_banned_user"