diff options
Diffstat (limited to 'bot/models.py')
-rw-r--r-- | bot/models.py | 9 |
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 @@ | |||
1 | from django.contrib.auth.models import AbstractUser | ||
2 | from django.db import models | ||
3 | |||
4 | |||
5 | class 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' | ||