aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bot/models.py')
-rw-r--r--bot/models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bot/models.py b/bot/models.py
new file mode 100644
index 0000000..c6df3e7
--- /dev/null
+++ b/bot/models.py
@@ -0,0 +1,9 @@
1from django.contrib.auth.models import AbstractUser
2from django.db import models
3
4
5class User(AbstractUser):
6 name = models.CharField(max_length=50, blank=True)
7 telegram_id = models.PositiveBigIntegerField(unique=True, primary_key=True)
8 username = models.CharField(max_length=32, blank=False)
9 USERNAME_FIELD = 'telegram_id'
Powered by cgit v1.2.3 (git 2.41.0)