mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 14:27:10 +00:00
<type>(scope): <description>
[body] [footer(s)]
This commit is contained in:
@@ -11,11 +11,14 @@ class UserRole(models.TextChoices):
|
||||
|
||||
|
||||
class User(BaseModel):
|
||||
avatar = models.ImageField(verbose_name="аватар")
|
||||
email = models.EmailField(unique=True, verbose_name="почта")
|
||||
username = models.SlugField(unique=True, verbose_name="юзернейм")
|
||||
password = models.TextField(verbose_name="пароль")
|
||||
|
||||
created_at = models.DateTimeField(auto_now=True, verbose_name="дата создания")
|
||||
created_at = models.DateTimeField(
|
||||
auto_now=True, verbose_name="дата создания"
|
||||
)
|
||||
|
||||
achievements = models.ManyToManyField(
|
||||
Achievement, blank=True, verbose_name="ачивки пользователя"
|
||||
@@ -29,8 +32,10 @@ class User(BaseModel):
|
||||
return check_password(self.password, password)
|
||||
|
||||
status = models.CharField(
|
||||
max_length=10, choices=UserRole.choices, default="student",
|
||||
verbose_name="роль участника"
|
||||
max_length=10,
|
||||
choices=UserRole.choices,
|
||||
default="student",
|
||||
verbose_name="роль участника",
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user