{
  "$schema": "https://datapackage.org/profiles/2.0/tableschema.json",
  "title": "作業班",
  "description": "一緒に作業する人の班 1 つです。人数、技能、拠点、働ける時間を持ちます。班の人の名前や連絡先は持ちません。車両と班を分けておくと、日によって組み合わせを変えられます。",
  "x-type": "Crew",
  "x-typeIri": "https://datamodels.jp/ns/fieldservice/Crew",
  "x-version": "1.0.0",
  "x-schema": "https://datamodels.jp/schema/fieldservice/Crew/v1.0.0.json",
  "x-context": "https://datamodels.jp/context/fieldservice/v1.jsonld",
  "x-translations": {
    "en": {
      "title": "Crew",
      "description": "One team of people who work together: its size, skills, depot and working hours. It holds no names or contacts of its members. Keeping crews apart from vehicles lets the pairing change from day to day."
    }
  },
  "fields": [
    {
      "name": "id",
      "title": "エンティティの ID",
      "description": "エンティティの ID（URI。例：urn:ngsi-ld:Crew:001）",
      "type": "string",
      "constraints": {
        "required": true,
        "unique": true
      },
      "x-translations": {
        "en": {
          "title": "Entity id",
          "description": "Entity id: a URI, for example urn:ngsi-ld:Crew:001"
        }
      }
    },
    {
      "name": "label",
      "title": "班の呼び名",
      "description": "班の呼び名。言語ごとに書きます（例：{\"ja\": \"収集班 A\", \"en\": \"Collection team A\"}）。",
      "type": "object",
      "x-iri": "http://www.w3.org/2000/01/rdf-schema#label",
      "constraints": {
        "jsonSchema": {
          "type": "object",
          "minProperties": 1,
          "propertyNames": {
            "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$"
          },
          "additionalProperties": {
            "type": "string",
            "minLength": 1
          },
          "description": "What the provider calls the crew, per language (for example {\"ja\": \"収集班 A\", \"en\": \"Collection team A\"})"
        }
      },
      "x-translations": {
        "en": {
          "description": "What the provider calls the crew, per language (for example {\"ja\": \"収集班 A\", \"en\": \"Collection team A\"})"
        }
      }
    },
    {
      "name": "provider",
      "title": "作業を引き受ける組織",
      "description": "作業を引き受ける組織（自治体、委託先など）",
      "type": "string",
      "format": "uri",
      "x-iri": "https://schema.org/provider",
      "x-translations": {
        "en": {
          "title": "The organisation that does the work",
          "description": "The organisation that does the work (a municipality, a contractor)"
        }
      }
    },
    {
      "name": "localGovernmentCode",
      "title": "作業する自治体の全国地方公共団体コード",
      "description": "作業する自治体の全国地方公共団体コード（6 桁）",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/localGovernmentCode",
      "constraints": {
        "pattern": "\\d{6}"
      },
      "x-translations": {
        "en": {
          "title": "Local government code",
          "description": "Local government code (6 digits) of the municipality it works for"
        }
      }
    },
    {
      "name": "size",
      "title": "人数",
      "description": "人数",
      "type": "integer",
      "x-iri": "https://datamodels.jp/ns/fieldservice/size",
      "constraints": {
        "required": true,
        "minimum": 1
      },
      "x-translations": {
        "en": {
          "title": "How many people",
          "description": "How many people"
        }
      }
    },
    {
      "name": "skills",
      "title": "班ができること",
      "description": "班ができること（例：two-person、carry-out）。車両の skills と合わせて、依頼の skills と照らし合わせます。複数の値は ; で区切ります。",
      "type": "list",
      "itemType": "string",
      "delimiter": ";",
      "x-iri": "https://datamodels.jp/ns/fieldservice/skills",
      "constraints": {
        "minLength": 1
      },
      "x-translations": {
        "en": {
          "title": "What the crew can do",
          "description": "What the crew can do (for example two-person, carry-out); together with the vehicle's skills, matched against a request's skills. Several values separated by ;."
        }
      }
    },
    {
      "name": "depot",
      "title": "出発する拠点",
      "description": "出発する拠点（Facility）",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/fieldservice/depot",
      "x-translations": {
        "en": {
          "title": "Where the work starts",
          "description": "Where the work starts: a Facility"
        }
      }
    },
    {
      "name": "workingHours",
      "title": "班が働ける曜日と時間",
      "description": "班が働ける曜日と時間（OpeningHours の値のリスト）。車両の workingHours と重なる時間だけ計画します。",
      "type": "array",
      "x-iri": "https://datamodels.jp/ns/fieldservice/workingHours",
      "constraints": {
        "jsonSchema": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "https://datamodels.jp/schema/common/OpeningHours/v1.0.0.json"
          },
          "description": "When the crew can work, as a list of OpeningHours values; only the time it shares with its vehicle's workingHours is planned"
        }
      },
      "x-translations": {
        "en": {
          "description": "When the crew can work, as a list of OpeningHours values; only the time it shares with its vehicle's workingHours is planned"
        }
      }
    },
    {
      "name": "assignedVehicle",
      "title": "ふだん使う車両",
      "description": "ふだん使う車両（ServiceVehicle）。日ごとの組み合わせは RoutePlan に残ります。",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/fieldservice/assignedVehicle",
      "x-translations": {
        "en": {
          "title": "The vehicle it usually works with",
          "description": "The vehicle it usually works with: a ServiceVehicle. The pairing of each day is in the RoutePlan"
        }
      }
    },
    {
      "name": "source",
      "title": "データの出典",
      "description": "データの出典（URL など）",
      "type": "string",
      "x-iri": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/source",
      "constraints": {
        "minLength": 1
      },
      "x-translations": {
        "en": {
          "title": "Where the data comes from",
          "description": "Where the data comes from (a URL, for example)"
        }
      }
    }
  ],
  "primaryKey": [
    "id"
  ],
  "missingValues": [
    ""
  ]
}
