from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): name = models.CharField(max_length=50, blank=True) telegram_id = models.PositiveBigIntegerField(unique=True, primary_key=True) username = models.CharField(max_length=32, blank=False) USERNAME_FIELD = 'telegram_id'