{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://decisioq.local/schemas/assign-service-bay.input.schema.json",
  "title": "Assign Service Bay Input Payload",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "repairOrders"
  ],
  "properties": {
    "requestContext": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "sourceSystem": {
          "type": "string"
        },
        "correlationId": {
          "type": "string"
        }
      }
    },
    "repairOrders": {
      "type": "array",
      "minItems": 2,
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "assessment",
          "name",
          "optionId",
          "risk",
          "schedule"
        ],
        "properties": {
          "optionId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "assessment": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "equipmentFitScore": {
                "type": "number"
              },
              "bayAvailabilityScore": {
                "type": "number"
              },
              "vehicleSizeFitScore": {
                "type": "number"
              },
              "workflowEfficiencyScore": {
                "type": "number"
              }
            }
          },
          "risk": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "safetyConstraintRisk": {
                "type": "number"
              }
            }
          },
          "schedule": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "setupTimeMinutes": {
                "type": "number"
              }
            }
          }
        }
      }
    }
  }
}
