('Specialist', 'Specialist'),
)
class PhoneModel(models.Model):
phone = models.CharField(validators=[phone_regex], max_length=13, blank=True)
is_verified = models.BooleanField(blank=False, default=False)
counter = models.IntegerField(default=0, blank=False)
def __str__(self):
return f'{self.phone}'
class ClientUser(AbstractBaseUser):
user_role = models.CharField(choices=ROLE_CHOICES, default=None, max_length=15)
phone = models.OneToOneField(PhoneModel, on_delete=models.CASCADE)
class SpecialistUser(AbstractBaseUser):
user_role = models.CharField(choices=ROLE_CHOICES, default=None, max_length=15)
phone = models.OneToOneField(PhoneModel, on_delete=models.CASCADE)
Обсуждают сегодня