{
  "type": "ServiceVehicle",
  "domain": "fieldservice",
  "description": "作業に使う車両 1 台を、計画に使う形で表します。積載量、技能、出発と帰着の拠点、働ける時間で、ルート最適化（VRP）のソフトウェアの vehicle にそのまま渡せます。Smart Data Models の FleetVehicle（車隊の中の 1 台）のサブクラスで、車両そのもの（ナンバーなど）は vehicle で Vehicle を指します。",
  "contextUrl": "https://datamodels.jp/context/fieldservice/v1.jsonld",
  "propertyDetails": {
    "label": {
      "ngsiType": "LanguageProperty",
      "valueType": "object",
      "example": {
        "languageMap": {
          "ja": "2号車",
          "en": "Truck 2"
        }
      },
      "required": false,
      "description": "呼び名。言語ごとに書きます（例：{\"ja\": \"2号車\", \"en\": \"Truck 2\"}）。",
      "@context": "http://www.w3.org/2000/01/rdf-schema#label"
    },
    "vehicle": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Vehicle:131016-truck-02",
      "required": false,
      "description": "車両そのもの（Smart Data Models の Vehicle）。FleetVehicle と同じ意味です。",
      "@context": "https://smartdatamodels.org/dataModel.Transportation/vehicle",
      "objectType": "https://smartdatamodels.org/dataModel.Transportation/Vehicle"
    },
    "fleetVehicleType": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "Waste collection",
      "required": false,
      "description": "車両の用途（FleetVehicle と同じ意味。例：Waste collection）",
      "@context": "https://smartdatamodels.org/dataModel.Transportation/fleetVehicleType",
      "validation": {
        "minLength": 1
      }
    },
    "provider": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Organization:131016",
      "required": false,
      "description": "作業を引き受ける組織（自治体、委託先など）",
      "@context": "https://schema.org/provider"
    },
    "localGovernmentCode": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "131016",
      "required": false,
      "description": "作業する自治体の全国地方公共団体コード（6 桁）",
      "@context": "https://datamodels.jp/ns/common/localGovernmentCode",
      "validation": {
        "pattern": "^\\d{6}$"
      }
    },
    "capacity": {
      "ngsiType": "Property",
      "valueType": "array",
      "example": [
        20
      ],
      "required": true,
      "description": "積載量。次元ごとの数で、依頼の load と同じ次元と単位にします。ルート最適化の capacity にあたります。",
      "@context": "https://datamodels.jp/ns/fieldservice/capacity",
      "validation": {
        "items": {
          "minimum": 0
        },
        "minItems": 1
      }
    },
    "skills": {
      "ngsiType": "Property",
      "valueType": "array",
      "example": [
        "two-person"
      ],
      "required": false,
      "description": "車両ができること（例：two-person）。依頼の skills がすべてここにある車両だけが、その依頼に割り当てられます。",
      "@context": "https://datamodels.jp/ns/fieldservice/skills",
      "validation": {
        "items": {
          "minLength": 1
        },
        "minItems": 1,
        "uniqueItems": true
      }
    },
    "depot": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Facility:131016-131016F00001",
      "required": false,
      "description": "出発する拠点（Facility）",
      "@context": "https://datamodels.jp/ns/fieldservice/depot",
      "objectType": "https://datamodels.jp/ns/facility/Facility"
    },
    "endDepot": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": null,
      "required": false,
      "description": "帰着する拠点（Facility）。無ければ depot に戻ります。",
      "@context": "https://datamodels.jp/ns/fieldservice/endDepot",
      "objectType": "https://datamodels.jp/ns/facility/Facility"
    },
    "workingHours": {
      "ngsiType": "Property",
      "valueType": "array",
      "example": [
        {
          "dayOfWeek": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday",
            "Saturday"
          ],
          "opens": "08:00",
          "closes": "16:00"
        }
      ],
      "required": false,
      "description": "働ける曜日と時間（OpeningHours の値のリスト）。ルート最適化の、車両の time window の元になります。",
      "@context": "https://datamodels.jp/ns/fieldservice/workingHours",
      "validation": {
        "minItems": 1
      }
    },
    "maxStops": {
      "ngsiType": "Property",
      "valueType": "integer",
      "example": 30,
      "required": false,
      "description": "1 日に回れる件数の上限",
      "@context": "https://datamodels.jp/ns/fieldservice/maxStops",
      "validation": {
        "minimum": 1
      }
    },
    "maxWorkDuration": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "PT8H",
      "required": false,
      "description": "1 日に働ける時間の上限（ISO 8601 の期間）",
      "@context": "https://datamodels.jp/ns/fieldservice/maxWorkDuration"
    },
    "crew": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Crew:131016:field-team-a",
      "required": false,
      "description": "この車両で働く班（Crew）",
      "@context": "https://datamodels.jp/ns/fieldservice/crew",
      "objectType": "https://datamodels.jp/ns/fieldservice/Crew"
    },
    "source": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": null,
      "required": false,
      "description": "データの出典（URL など）",
      "@context": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/source",
      "validation": {
        "minLength": 1
      }
    }
  },
  "additionalProperties": false
}
