{
  "type": "Task",
  "domain": "task",
  "description": "追跡の対象となる作業の単位です。課題管理システムの「チケット」や「Issue」、カレンダーの ToDo、自治体の作業指示などにあたります。状態と優先度の値は RFC 8984（JSCalendar）に合わせ、元のシステム固有の状態名や種別は statusLabel と subtype に残します。位置には任意のジオメトリを使えます。",
  "contextUrl": "https://datamodels.jp/context/task/v1.jsonld",
  "propertyDetails": {
    "name": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "靖国通りのアンダーパスの冠水を確認する",
      "required": true,
      "description": "名称・件名",
      "@context": "https://uri.etsi.org/ngsi-ld/name"
    },
    "description": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "住民からの通報の現地確認。水位と通行可否を報告すること。",
      "required": false,
      "description": "説明",
      "@context": "http://purl.org/dc/terms/description"
    },
    "project": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Project:heavy-rain-2026-07",
      "required": false,
      "description": "所属するプロジェクト（元のシステムにプロジェクトの概念があるとき）",
      "@context": "https://datamodels.jp/ns/task/project"
    },
    "milestone": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Milestone:heavy-rain-2026-07-initial",
      "required": false,
      "description": "予定しているマイルストーン（バージョン、リリース）",
      "@context": "https://datamodels.jp/ns/task/milestone"
    },
    "parent": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Task:1200",
      "required": false,
      "description": "親タスク（RFC 8984 relatedTo parent）",
      "@context": "https://datamodels.jp/ns/task/parent"
    },
    "relatedTo": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": [
        "urn:ngsi-ld:Task:1198"
      ],
      "required": false,
      "description": "関連するタスク。key-values 形式では、対象が 1 つでも配列です。関係の種類（blocks、precedes、duplicates など）は拡張で表します。",
      "@context": "https://datamodels.jp/ns/task/relatedTo"
    },
    "refersTo": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:RoadRestriction:0001",
      "required": false,
      "description": "このタスクが対象とするエンティティ（通報、設備、道路など）",
      "@context": "https://datamodels.jp/ns/task/refersTo"
    },
    "progress": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "in-process",
      "required": false,
      "description": "正規化した進行状態（RFC 8984 progress）：needs-action（未着手）、in-process（対応中）、completed（完了）、failed（失敗）、cancelled（取消）。合う値がないときは省き、statusLabel に元の呼び方を書きます。",
      "@context": "https://datamodels.jp/ns/task/progress",
      "validation": {
        "enum": [
          "needs-action",
          "in-process",
          "completed",
          "failed",
          "cancelled"
        ]
      }
    },
    "statusLabel": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "対応中",
      "required": false,
      "description": "元のシステムの状態名をそのまま（「対応中」「解決」など）。progress を省いたときは必須です。",
      "@context": "https://datamodels.jp/ns/task/statusLabel",
      "validation": {
        "minLength": 1
      }
    },
    "subtype": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "現地確認",
      "required": false,
      "description": "元のシステムでの種別（トラッカー、Issue のタイプ、カテゴリなど）",
      "@context": "https://datamodels.jp/ns/task/subtype"
    },
    "priority": {
      "ngsiType": "Property",
      "valueType": "integer",
      "example": 2,
      "required": false,
      "description": "優先度 0〜9。1 が最高、9 が最低で、0 は未定義です（RFC 8984）。",
      "@context": "https://datamodels.jp/ns/task/priority",
      "validation": {
        "minimum": 0,
        "maximum": 9
      }
    },
    "assignee": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": [
        "urn:ngsi-ld:Team:field-team-a"
      ],
      "required": false,
      "description": "担当する人、組織、チーム（そのエンティティ。このサブジェクトの外の URN でも構いません）。key-values 形式では、対象が 1 つでも配列です。",
      "@context": "https://datamodels.jp/ns/task/assignee"
    },
    "author": {
      "ngsiType": "Relationship",
      "valueType": "uri",
      "example": "urn:ngsi-ld:Person:staff-0012",
      "required": false,
      "description": "作成者（人、組織、チームのエンティティ）",
      "@context": "https://schema.org/author"
    },
    "start": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "2026-07-08T10:30:00+09:00",
      "required": false,
      "description": "開始の予定。日付か日時（RFC 8984 start）",
      "@context": "https://datamodels.jp/ns/task/start",
      "validation": {
        "pattern": "^\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])(?:T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d))?$"
      }
    },
    "due": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "2026-07-08T12:00:00+09:00",
      "required": false,
      "description": "期限。日付か日時（RFC 8984 due）",
      "@context": "https://datamodels.jp/ns/task/due",
      "validation": {
        "pattern": "^\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])(?:T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d))?$"
      }
    },
    "completedAt": {
      "ngsiType": "Property",
      "valueType": "datetime",
      "example": null,
      "required": false,
      "description": "progress が completed になった日時",
      "@context": "https://datamodels.jp/ns/task/completedAt"
    },
    "estimatedDuration": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "PT1H30M",
      "required": false,
      "description": "見積もった作業時間。ISO 8601 の期間（例：PT1H30M）で書きます（RFC 8984 estimatedDuration）。",
      "@context": "https://datamodels.jp/ns/task/estimatedDuration",
      "validation": {
        "pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$"
      }
    },
    "percentComplete": {
      "ngsiType": "Property",
      "valueType": "integer",
      "example": 40,
      "required": false,
      "description": "進捗率 0〜100（RFC 8984 percentComplete）",
      "@context": "https://datamodels.jp/ns/task/percentComplete",
      "validation": {
        "minimum": 0,
        "maximum": 100
      }
    },
    "keywords": {
      "ngsiType": "Property",
      "valueType": "array",
      "example": [
        "冠水",
        "現地確認"
      ],
      "required": false,
      "description": "キーワード、ラベル",
      "@context": "https://schema.org/keywords"
    },
    "location": {
      "ngsiType": "GeoProperty",
      "valueType": "geojson",
      "example": {
        "type": "Point",
        "coordinates": [
          139.7512,
          35.6953
        ]
      },
      "required": false,
      "description": "位置。点、線、面、それらの集まりなど、任意の GeoJSON ジオメトリ",
      "@context": "https://uri.etsi.org/ngsi-ld/location"
    },
    "spatialId": {
      "ngsiType": "Property",
      "valueType": "array",
      "example": [
        "/25/0/29802971/13211383"
      ],
      "required": false,
      "description": "タスクの範囲を覆う空間 ID（ZFXY）。任意です。",
      "@context": "https://datamodels.jp/ns/task/spatialId"
    },
    "isPrivate": {
      "ngsiType": "Property",
      "valueType": "boolean",
      "example": false,
      "required": false,
      "description": "非公開なら true。既定は false です。",
      "@context": "https://datamodels.jp/ns/task/isPrivate"
    },
    "source": {
      "ngsiType": "Property",
      "valueType": "uri",
      "example": "https://tracker.example.jp/issues/1234",
      "required": false,
      "description": "元のシステムでのこのタスクの URL",
      "@context": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/source"
    },
    "externalId": {
      "ngsiType": "Property",
      "valueType": "string",
      "example": "1234",
      "required": false,
      "description": "元のシステムでの識別子",
      "@context": "https://datamodels.jp/ns/task/externalId"
    },
    "dateCreated": {
      "ngsiType": "Property",
      "valueType": "datetime",
      "example": "2026-07-08T10:20:00+09:00",
      "required": false,
      "description": "元のシステムでの作成日時（ブローカーの createdAt とは別）",
      "@context": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/dateCreated"
    },
    "dateModified": {
      "ngsiType": "Property",
      "valueType": "datetime",
      "example": "2026-07-08T11:05:00+09:00",
      "required": false,
      "description": "元のシステムでの更新日時",
      "@context": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/dateModified"
    }
  },
  "additionalProperties": false
}
