This commit is contained in:
Shaxobff
2026-04-24 16:00:17 +05:00
parent e27a9b7f11
commit deebae384c
7 changed files with 76 additions and 58 deletions

View File

@@ -18,7 +18,7 @@ class User(auth_models.AbstractUser):
default=RoleChoice.USER,
)
avatar = models.ImageField(upload_to="avatars/", null=True, blank=True)
role_permission = models.ForeignKey(Role, on_delete=models.SET_NULL, null=True)
permission = models.ForeignKey(Role, on_delete=models.SET_NULL, null=True)
USERNAME_FIELD = "phone"
objects = UserManager()