import graphene from graphene import InputObjectType class InvoiceCreateInput(InputObjectType): """ Input type for creating a new invoice. """ customer_id = graphene.ID(required=True, description="ID of the customer for this invoice") date = graphene.DateTime(required=True, description="Date of the invoice (YYYY-MM-DD)") # Related items account_ids = graphene.List(graphene.ID, description="List of account IDs to include in this invoice") project_ids = graphene.List(graphene.ID, description="List of project IDs to include in this invoice") # Status and payment status = graphene.String(description="Status of the invoice (draft, sent, paid, overdue, cancelled)") date_paid = graphene.DateTime(description="Date the invoice was paid (YYYY-MM-DD)") payment_type = graphene.String(description="Payment type (check, credit_card, bank_transfer, cash)") # Financial total_amount = graphene.Float(required=True, description="Total amount of the invoice") class InvoiceUpdateInput(InputObjectType): """ Input type for updating an existing invoice. """ id = graphene.ID(required=True, description="ID of the invoice to update") customer_id = graphene.ID(description="ID of the customer for this invoice") date = graphene.DateTime(description="Date of the invoice (YYYY-MM-DD)") # Related items account_ids = graphene.List(graphene.ID, description="List of account IDs to include in this invoice") project_ids = graphene.List(graphene.ID, description="List of project IDs to include in this invoice") # Status and payment status = graphene.String(description="Status of the invoice (draft, sent, paid, overdue, cancelled)") date_paid = graphene.DateTime(description="Date the invoice was paid (YYYY-MM-DD)") payment_type = graphene.String(description="Payment type (check, credit_card, bank_transfer, cash)") # Financial total_amount = graphene.Float(description="Total amount of the invoice") class InvoiceFilterInput(InputObjectType): """ Input type for filtering invoices. """ customer_id = graphene.ID(description="Filter by customer ID") status = graphene.String(description="Filter by status") start_date = graphene.DateTime(description="Filter by start date (inclusive)") end_date = graphene.DateTime(description="Filter by end date (inclusive)") min_amount = graphene.Float(description="Filter by minimum amount") max_amount = graphene.Float(description="Filter by maximum amount") is_paid = graphene.Boolean(description="Filter by paid status") is_overdue = graphene.Boolean(description="Filter by overdue status")