{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-spot-event-schema.json",
  "title": "SpotEvent",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-yms-spot-api-openapi.yml#/components/schemas/SpotEvent",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the record",
      "readOnly": true
    },
    "createDateTime": {
      "format": "date-time",
      "type": "string",
      "description": "The date and time when the record was created",
      "readOnly": true
    },
    "createdBy": {
      "type": "object",
      "description": "The ID of the user who created the record",
      "readOnly": true
    },
    "lastChangedDateTime": {
      "format": "date-time",
      "type": "string",
      "description": "The date and time when the record was last changed",
      "readOnly": true
    },
    "spotId": {
      "type": "string",
      "format": "uuid",
      "description": "The id of the spot"
    },
    "eventType": {
      "$ref": "#/$defs/SpotEventTypeEnum"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the event"
    },
    "observation": {
      "type": "string",
      "description": "The observation of the event"
    },
    "assetContainerId": {
      "type": "string",
      "description": "The ID of the asset container associated with this event"
    },
    "assetVisitId": {
      "type": "string",
      "description": "The ID of the asset visit associated with this event"
    }
  },
  "required": [
    "id",
    "createDateTime",
    "createdBy",
    "lastChangedDateTime",
    "spotId",
    "eventType"
  ],
  "$defs": {
    "SpotEventTypeEnum": {
      "type": "string",
      "description": "The type of the event",
      "enum": [
        "assignment",
        "release",
        "reserve",
        "release_reserve",
        "close",
        "open",
        "other"
      ]
    }
  }
}