validations updated

This commit is contained in:
2025-01-19 21:06:00 +03:00
parent d6785ed36f
commit 8e34497c80
49 changed files with 2642 additions and 142 deletions

View File

@@ -61,12 +61,21 @@ class OccupantSelection(BaseModel, OccupantSelectionValidation):
model_config = ConfigDict(
json_schema_extra={
"example": {
"build_living_space_uu_id": "987fcdeb-51a2-43e7-9876-543210987654"
}
"example": [
{"company_uu_id": "abcdef12-3456-7890-abcd-ef1234567890"},
{"build_living_space_uu_id": "987fcdeb-51a2-43e7-9876-543210987654"},
],
}
)
@property
def is_employee(self):
return False
@property
def is_occupant(self):
return True
class EmployeeSelectionValidation:
tr = {"company_uu_id": "Şirket UU ID"}
@@ -78,10 +87,21 @@ class EmployeeSelection(BaseModel, EmployeeSelectionValidation):
model_config = ConfigDict(
json_schema_extra={
"example": {"company_uu_id": "abcdef12-3456-7890-abcd-ef1234567890"}
"example": [
{"company_uu_id": "abcdef12-3456-7890-abcd-ef1234567890"},
{"build_living_space_uu_id": "987fcdeb-51a2-43e7-9876-543210987654"},
],
}
)
@property
def is_employee(self):
return True
@property
def is_occupant(self):
return False
class LoginValidation:
tr = {