49 lines
2.5 KiB
Python
49 lines
2.5 KiB
Python
import graphene
|
|
from graphene import InputObjectType
|
|
|
|
|
|
class ServiceCreateInput(InputObjectType):
|
|
"""
|
|
Input type for creating a new service.
|
|
"""
|
|
account_id = graphene.ID(required=True, description="ID of the account this service is for")
|
|
date = graphene.String(required=True, description="Date of the service (YYYY-MM-DD)")
|
|
status = graphene.String(description="Status of the service (scheduled, in_progress, completed, cancelled)",
|
|
default_value="scheduled")
|
|
team_member_ids = graphene.List(graphene.ID, description="List of team member profile IDs assigned to this service")
|
|
notes = graphene.String(description="Notes about the service")
|
|
|
|
# Service window
|
|
deadline_start = graphene.DateTime(required=True, description="Start time of service window (YYYY-MM-DD HH:MM:SS)")
|
|
deadline_end = graphene.DateTime(required=True, description="End time of service window (YYYY-MM-DD HH:MM:SS)")
|
|
|
|
|
|
class ServiceUpdateInput(InputObjectType):
|
|
"""
|
|
Input type for updating an existing service.
|
|
"""
|
|
id = graphene.ID(required=True, description="ID of the service to update")
|
|
account_id = graphene.ID(description="ID of the account this service is for")
|
|
date = graphene.String(description="Date of the service (YYYY-MM-DD)")
|
|
status = graphene.String(description="Status of the service (scheduled, in_progress, completed, cancelled)")
|
|
team_member_ids = graphene.List(graphene.ID, description="List of team member profile IDs assigned to this service")
|
|
notes = graphene.String(description="Notes about the service")
|
|
|
|
# Service window
|
|
deadline_start = graphene.DateTime(description="Start time of service window (YYYY-MM-DD HH:MM:SS)")
|
|
deadline_end = graphene.DateTime(description="End time of service window (YYYY-MM-DD HH:MM:SS)")
|
|
|
|
|
|
class ServiceFilterInput(InputObjectType):
|
|
"""
|
|
Input type for filtering services.
|
|
"""
|
|
account_id = graphene.ID(description="Filter by account ID")
|
|
status = graphene.String(description="Filter by status")
|
|
team_member_id = graphene.ID(description="Filter by team member ID")
|
|
start_date = graphene.DateTime(description="Filter by start date (inclusive)")
|
|
end_date = graphene.DateTime(description="Filter by end date (inclusive)")
|
|
is_upcoming = graphene.Boolean(description="Filter for upcoming services")
|
|
is_today = graphene.Boolean(description="Filter for today's services")
|
|
is_past_due = graphene.Boolean(description="Filter for past due services")
|