feat: added client app

This commit is contained in:
ITQ
2025-02-16 13:06:01 +03:00
parent cb0a73891c
commit 2fedb0d670
7 changed files with 133 additions and 0 deletions
@@ -0,0 +1,28 @@
from uuid import UUID
from django.core.validators import MaxValueValidator
from django.db import models
from apps.core.models import BaseModel
class Client(BaseModel):
class GenderChoices(models.TextChoices):
MALE = "MALE", "MALE"
FEMALE = "FEMALE", "FEMALE"
login = models.TextField()
age = models.PositiveSmallIntegerField(validators=[MaxValueValidator(100)])
location = models.TextField()
gender = models.CharField(max_length=6, choices=GenderChoices)
def __str__(self) -> str:
return self.login
@property
def client_id(self) -> UUID:
return self.id
@client_id.setter
def client_id(self, value: UUID) -> None:
self.id = value