{ "name": "Assignment", "type": "object", "properties": { "assignment_number": { "type": "string", "description": "Assignment Number format ASN-#### (auto-generated)", "pattern": "^ASN-[0-9]{4,6}$" }, "order_id": { "type": "string", "description": "Associated order ID" }, "order_number": { "type": "string", "description": "Associated order number" }, "workforce_id": { "type": "string", "description": "Assigned worker ID" }, "workforce_name": { "type": "string", "description": "Assigned worker name" }, "vendor_id": { "type": "string", "description": "Vendor providing the worker" }, "vendor_name": { "type": "string", "description": "Vendor name" }, "partner_id": { "type": "string", "description": "Client/partner ID" }, "role": { "type": "string", "description": "Role assigned" }, "department": { "type": "string", "description": "Department" }, "assignment_status": { "type": "string", "enum": [ "Pending", "Confirmed", "Checked In", "In Progress", "Completed", "Cancelled", "No Show" ], "default": "Pending", "description": "Assignment status" }, "scheduled_start": { "type": "string", "format": "date-time", "description": "Scheduled start time" }, "scheduled_end": { "type": "string", "format": "date-time", "description": "Scheduled end time" }, "actual_start": { "type": "string", "format": "date-time", "description": "Actual start time" }, "actual_end": { "type": "string", "format": "date-time", "description": "Actual end time" }, "timesheet": { "type": "object", "description": "Timesheet data", "properties": { "clock_in": { "type": "string", "format": "date-time" }, "clock_out": { "type": "string", "format": "date-time" }, "break_minutes": { "type": "number" }, "total_hours": { "type": "number" }, "regular_hours": { "type": "number" }, "overtime_hours": { "type": "number" }, "approved_by": { "type": "string" }, "approved_date": { "type": "string", "format": "date-time" } } }, "ratings": { "type": "object", "description": "Performance ratings", "properties": { "punctuality": { "type": "number", "minimum": 1, "maximum": 5 }, "quality_of_work": { "type": "number", "minimum": 1, "maximum": 5 }, "professionalism": { "type": "number", "minimum": 1, "maximum": 5 }, "would_hire_again": { "type": "boolean" }, "comments": { "type": "string" }, "rated_by": { "type": "string" }, "rated_date": { "type": "string", "format": "date-time" } } }, "pay_rate": { "type": "number", "description": "Worker pay rate" }, "bill_rate": { "type": "number", "description": "Client bill rate" }, "total_pay": { "type": "number", "description": "Total worker pay" }, "total_bill": { "type": "number", "description": "Total client bill" }, "notes": { "type": "string", "description": "Assignment notes" } }, "required": [ "order_id", "workforce_id", "vendor_id", "role" ] }