63 lines
2.8 KiB
Python
63 lines
2.8 KiB
Python
import graphene
|
|
from graphene import InputObjectType
|
|
|
|
class ReportCreateInput(InputObjectType):
|
|
"""
|
|
Input type for creating a new report.
|
|
"""
|
|
date = graphene.String(required=True, description="Date of the report (YYYY-MM-DD)")
|
|
team_member_id = graphene.ID(required=True, description="ID of the team member submitting the report")
|
|
service_ids = graphene.List(graphene.ID, description="List of service IDs included in this report")
|
|
project_ids = graphene.List(graphene.ID, description="List of project IDs included in this report")
|
|
notes = graphene.String(description="Notes about the report")
|
|
|
|
|
|
class ReportUpdateInput(InputObjectType):
|
|
"""
|
|
Input type for updating an existing report.
|
|
"""
|
|
id = graphene.ID(required=True, description="ID of the report to update")
|
|
date = graphene.String(description="Date of the report (YYYY-MM-DD)")
|
|
team_member_id = graphene.ID(description="ID of the team member submitting the report")
|
|
service_ids = graphene.List(graphene.ID, description="List of service IDs included in this report")
|
|
project_ids = graphene.List(graphene.ID, description="List of project IDs included in this report")
|
|
notes = graphene.String(description="Notes about the report")
|
|
|
|
|
|
class TeamMemberReportsInput(InputObjectType):
|
|
"""
|
|
Input type for retrieving team member reports.
|
|
"""
|
|
team_member_id = graphene.ID(required=True, description="ID of the team member")
|
|
start_date = graphene.String(description="Start date for report range (YYYY-MM-DD)")
|
|
end_date = graphene.DateTime(description="End date for report range (YYYY-MM-DD)")
|
|
|
|
|
|
class TeamMemberActivityInput(InputObjectType):
|
|
"""
|
|
Input type for retrieving team member activity.
|
|
"""
|
|
team_member_id = graphene.ID(required=True, description="ID of the team member")
|
|
start_date = graphene.DateTime(description="Start date for activity range (YYYY-MM-DD)")
|
|
end_date = graphene.DateTime(description="End date for activity range (YYYY-MM-DD)")
|
|
|
|
|
|
class TeamSummaryInput(InputObjectType):
|
|
"""
|
|
Input type for retrieving team summary.
|
|
"""
|
|
start_date = graphene.DateTime(description="Start date for summary range (YYYY-MM-DD)")
|
|
end_date = graphene.DateTime(description="End date for summary range (YYYY-MM-DD)")
|
|
include_inactive = graphene.Boolean(description="Whether to include inactive team members")
|
|
|
|
import graphene
|
|
|
|
|
|
class ReportFilterInput(graphene.InputObjectType):
|
|
"""Input type for filtering reports"""
|
|
team_member_id = graphene.ID(description="Filter by team member ID")
|
|
start_date = graphene.DateTime(description="Filter by start date")
|
|
end_date = graphene.DateTime(description="Filter by end date")
|
|
has_services = graphene.Boolean(description="Filter by presence of services")
|
|
has_projects = graphene.Boolean(description="Filter by presence of projects")
|