{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assignar/json-schema/assignar-allocations-schema.json",
  "title": "Allocations",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assignar-allocations-api-openapi.yml#/components/schemas/Allocations",
  "type": "array",
  "items": {
    "$ref": "#/$defs/Allocation"
  },
  "$defs": {
    "Allocation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "resource_id": {
          "type": "integer"
        },
        "resource_date": {
          "type": "string"
        },
        "status_id": {
          "type": "integer"
        },
        "notified": {
          "type": "boolean"
        },
        "comments": {
          "type": "string"
        },
        "timesheet_id": {
          "type": "integer"
        },
        "resource": {
          "$ref": "#/$defs/OrderResource"
        },
        "status": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "readOnly": true
            },
            "name": {
              "type": "string"
            }
          }
        }
      }
    },
    "OrderResource": {
      "title": "OrderResource",
      "type": "object",
      "description": "",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "asset_id": {
          "type": "integer"
        },
        "user_id": {
          "type": "integer"
        },
        "order_id": {
          "type": "integer"
        },
        "order_task": {
          "$ref": "#/$defs/OrderTaskWithOrderAndTask"
        }
      }
    },
    "OrderTaskWithOrderAndTask": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "total_hours": {
          "type": "integer"
        },
        "order_id": {
          "type": "integer"
        },
        "task_id": {
          "type": "integer"
        },
        "shift_index": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "start_time": {
          "type": "string"
        },
        "end_time": {
          "type": "string"
        },
        "order": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "readOnly": true
            },
            "client_id": {
              "type": "integer"
            },
            "project_id": {
              "type": "integer"
            },
            "supplier_id": {
              "type": "integer"
            },
            "start_date": {
              "type": "string"
            },
            "end_date": {
              "type": "string"
            }
          }
        },
        "task": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}