validations updated
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user