O
Size: a a a
O
BK
ROLE_CHOICES = (
('client', 'client'),
('specialist', 'specialist'),
)
class Customer(AbstractBaseUser):
role = models.CharField(choices=ROLE_CHOICES, default=None, max_length=15)
phone = models.CharField(validators=[phone_regex], max_length=13, blank=True, unique=True)
email = models.EmailField(unique=True, blank=True, null=True)
is_verified = models.BooleanField(blank=False, default=False)
counter = models.IntegerField(default=0, blank=False)
full_name = models.CharField(max_length=255)
country = models.CharField(max_length=255, default='Украина')
password = None
class Specialist(AbstractBaseUser):
role = models.CharField(choices=ROLE_CHOICES, default=None, max_length=15)
phone = models.CharField(validators=[phone_regex], max_length=13, blank=True, unique=True)
email = models.EmailField(unique=True, blank=True, null=True)
docs = models.CharField(blank=True, null=True)
password = None
class User(models.Model):
role = models.OneToOneField(Customer, on_delete=models.CASCADE)
phone = models.OneToOneField(Customer, on_delete=models.CASCADE)
email = models.OneToOneField(Customer, on_delete=models.CASCADE)
O
ROLE_CHOICES = (
('client', 'client'),
('specialist', 'specialist'),
)
class Customer(AbstractBaseUser):
role = models.CharField(choices=ROLE_CHOICES, default=None, max_length=15)
phone = models.CharField(validators=[phone_regex], max_length=13, blank=True, unique=True)
email = models.EmailField(unique=True, blank=True, null=True)
is_verified = models.BooleanField(blank=False, default=False)
counter = models.IntegerField(default=0, blank=False)
full_name = models.CharField(max_length=255)
country = models.CharField(max_length=255, default='Украина')
password = None
class Specialist(AbstractBaseUser):
role = models.CharField(choices=ROLE_CHOICES, default=None, max_length=15)
phone = models.CharField(validators=[phone_regex], max_length=13, blank=True, unique=True)
email = models.EmailField(unique=True, blank=True, null=True)
docs = models.CharField(blank=True, null=True)
password = None
class User(models.Model):
role = models.OneToOneField(Customer, on_delete=models.CASCADE)
phone = models.OneToOneField(Customer, on_delete=models.CASCADE)
email = models.OneToOneField(Customer, on_delete=models.CASCADE)
BK
BK
O
O
O
BK
O
BK
O
BK
O
O
BK
O
BK
O
BK