base context for wrappers updated
This commit is contained in:
@@ -91,7 +91,15 @@ class OccupantTokenObject(ApplicationToken):
|
||||
available_occupants: dict = None
|
||||
|
||||
selected_occupant: Optional[OccupantToken] = None # Selected Occupant Type
|
||||
available_event: Optional[Any] = None
|
||||
|
||||
|
||||
@property
|
||||
def is_employee(self) -> bool:
|
||||
return False
|
||||
|
||||
@property
|
||||
def is_occupant(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
class EmployeeTokenObject(ApplicationToken):
|
||||
@@ -104,4 +112,12 @@ class EmployeeTokenObject(ApplicationToken):
|
||||
duty_uu_id_list: List[str] # List of duty objects
|
||||
|
||||
selected_company: Optional[CompanyToken] = None # Selected Company Object
|
||||
available_event: Optional[Any] = None
|
||||
|
||||
|
||||
@property
|
||||
def is_employee(self) -> bool:
|
||||
return True
|
||||
|
||||
@property
|
||||
def is_occupant(self) -> bool:
|
||||
return False
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
from ApiValidations.Request import BaseModelRegular
|
||||
|
||||
from typing import Optional
|
||||
@@ -55,15 +57,11 @@ class OccupantSelectionValidation:
|
||||
|
||||
|
||||
class OccupantSelection(BaseModel, OccupantSelectionValidation):
|
||||
occupant_uu_id: str = Field(..., example="123e4567-e89b-12d3-a456-426614174000")
|
||||
build_part_uu_id: str = Field(..., example="987fcdeb-51a2-43e7-9876-543210987654")
|
||||
build_living_space_uu_id: str = Field(..., example="987fcdeb-51a2-43e7-9876-543210987654")
|
||||
|
||||
model_config = ConfigDict(
|
||||
json_schema_extra={
|
||||
"example": {
|
||||
"occupant_uu_id": "123e4567-e89b-12d3-a456-426614174000",
|
||||
"build_part_uu_id": "987fcdeb-51a2-43e7-9876-543210987654",
|
||||
}
|
||||
"example": {"build_living_space_uu_id": "987fcdeb-51a2-43e7-9876-543210987654"}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -107,10 +105,10 @@ class Login(BaseModelRegular, LoginValidation):
|
||||
model_config = ConfigDict(
|
||||
json_schema_extra={
|
||||
"example": {
|
||||
"domain": "example.com",
|
||||
"access_key": "user@example.com",
|
||||
"password": "password123",
|
||||
"remember_me": True,
|
||||
"domain": "evyos.com.tr",
|
||||
"access_key": "karatay.berkay.sup@evyos.com.tr",
|
||||
"password": "string",
|
||||
"remember_me": False
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user