added managers apis
This commit is contained in:
@@ -46,6 +46,10 @@ class Worker(BaseModel):
|
||||
position: str
|
||||
responsibilities: List[str] = Field(default_factory=list)
|
||||
|
||||
class DepartmentMembers(BaseModel):
|
||||
managers: List[Manager] = Field(default_factory=list)
|
||||
workers: List[Worker] = Field(default_factory=list)
|
||||
|
||||
class Department(BaseModel):
|
||||
name: str
|
||||
managers: List[Manager] = Field(default_factory=list) # Updated to managers
|
||||
@@ -60,16 +64,55 @@ class ManagerSOPs(BaseModel):
|
||||
shall: List[str] = Field(default_factory=list)
|
||||
will: List[str] = Field(default_factory=list)
|
||||
|
||||
class WorkerSOPs(BaseModel):
|
||||
must: List[str] = Field(default_factory=list)
|
||||
shall: List[str] = Field(default_factory=list)
|
||||
will: List[str] = Field(default_factory=list)
|
||||
|
||||
class ManagerWithSOPs(BaseModel):
|
||||
title: str
|
||||
sops: ManagerSOPs
|
||||
|
||||
class WorkerWithSOPs(BaseModel):
|
||||
name: str
|
||||
position:str
|
||||
sops: ManagerSOPs
|
||||
|
||||
class DepartmentManagerSOPs(BaseModel):
|
||||
name: str
|
||||
managers: List[ManagerWithSOPs]
|
||||
|
||||
|
||||
class DepartmentWorkerSOPs(BaseModel):
|
||||
name: str
|
||||
workers: List[WorkerWithSOPs]
|
||||
|
||||
|
||||
class ExecutiveManagerSOPsResponse(BaseModel):
|
||||
departments: List[DepartmentManagerSOPs]
|
||||
|
||||
|
||||
class WorkerSOPsResponse(BaseModel):
|
||||
departments:List[DepartmentWorkerSOPs]
|
||||
|
||||
|
||||
|
||||
# Model for an assigned or unavailable role with name, position, and role fields
|
||||
class RoleWithPositionAndRole(BaseModel):
|
||||
name: str # Role name
|
||||
position: str # Role position (e.g., "Role Position")
|
||||
role: str # Role classification (e.g., "PRP" or "SRP")
|
||||
|
||||
# Model for an unassigned role with just name and position fields
|
||||
class RoleWithPositionOnly(BaseModel):
|
||||
name: str # Role name
|
||||
position: str # Reference role position
|
||||
|
||||
# Main model that includes assigned, unassigned, and unavailable roles
|
||||
class RolesComparisonResponse(BaseModel):
|
||||
assigned_roles: List[RoleWithPositionAndRole] = Field(default_factory=list) # List of assigned roles
|
||||
unassigned_roles: List[RoleWithPositionOnly] = Field(default_factory=list) # List of unassigned roles
|
||||
unavailable_roles: List[RoleWithPositionAndRole] = Field(default_factory=list)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user