Refactor User model: update mobile field to allow null values, enforce unique id_card, and implement user filtering API endpoint

This commit is contained in:
2025-03-26 22:49:11 +05:00
parent aa69977d63
commit ddfbeba2f4
7 changed files with 102 additions and 5 deletions

View File

@ -9,12 +9,11 @@ from django.utils import timezone
class User(AbstractUser):
email = models.EmailField(unique=True, blank=True, null=True)
address = models.CharField(max_length=255, blank=True)
mobile = models.CharField(max_length=255, blank=True, unique=True, default=0)
mobile = models.CharField(max_length=255, blank=True, unique=True, null=True)
designation = models.CharField(max_length=255, blank=True)
acc_no = models.CharField(max_length=255, blank=True)
id_card = models.CharField(max_length=255, blank=True)
id_card = models.CharField(max_length=255, blank=True, unique=True)
verified = models.BooleanField(default=False)
dob = models.DateField(blank=True, null=True)
terms_accepted = models.BooleanField(default=False)