T024: add function_type and group start/end dates to function groups UI
This commit is contained in:
@@ -103,12 +103,16 @@ class ProjectFunctionGroupCreateRequest(BaseModel):
|
||||
"""Request body for creating a function group."""
|
||||
name: str = Field(..., max_length=255)
|
||||
sort_order: int = 0
|
||||
start_date: datetime | None = None
|
||||
end_date: datetime | None = None
|
||||
|
||||
|
||||
class ProjectFunctionGroupUpdateRequest(BaseModel):
|
||||
"""Request body for updating a function group."""
|
||||
name: str | None = Field(None, max_length=255)
|
||||
sort_order: int | None = None
|
||||
start_date: datetime | None = None
|
||||
end_date: datetime | None = None
|
||||
|
||||
|
||||
class ProjectFunctionGroupResponse(BaseModel):
|
||||
@@ -117,6 +121,8 @@ class ProjectFunctionGroupResponse(BaseModel):
|
||||
name: str
|
||||
project_id: str
|
||||
sort_order: int = 0
|
||||
start_date: datetime | None = None
|
||||
end_date: datetime | None = None
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
@@ -134,6 +140,7 @@ class ProjectFunctionGroupListResponse(BaseModel):
|
||||
class ProjectFunctionCreateRequest(BaseModel):
|
||||
"""Request body for creating a project function."""
|
||||
name: str = Field(..., max_length=255)
|
||||
function_type: str = "crew"
|
||||
quantity: float = 1.0
|
||||
daily_costs: float = 0.0
|
||||
total_costs: float = 0.0
|
||||
@@ -143,6 +150,7 @@ class ProjectFunctionCreateRequest(BaseModel):
|
||||
class ProjectFunctionUpdateRequest(BaseModel):
|
||||
"""Request body for updating a project function."""
|
||||
name: str | None = Field(None, max_length=255)
|
||||
function_type: str | None = None
|
||||
quantity: float | None = None
|
||||
daily_costs: float | None = None
|
||||
total_costs: float | None = None
|
||||
@@ -154,6 +162,7 @@ class ProjectFunctionResponse(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
function_group_id: str
|
||||
function_type: str = "crew"
|
||||
quantity: float = 1.0
|
||||
daily_costs: float = 0.0
|
||||
total_costs: float = 0.0
|
||||
|
||||
Reference in New Issue
Block a user