{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/diary_photo_observation/v1.json",
  "title": "diary_photo_observation contract v1",
  "type": "object",
  "required": [
    "caption",
    "fact_class",
    "financial_period",
    "observation_id",
    "occurred_at",
    "parent_diary_source_id",
    "photo_index",
    "subject"
  ],
  "properties": {
    "asset": {
      "type": "string",
      "description": "Declared `ASSET` axis, inherited from the diary.",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "caption": {
      "type": "string",
      "description": "One factual sentence describing the image; the shelf's payload and `Fact.content`.",
      "x-demiton-requiredness": "required"
    },
    "project": {
      "type": "string",
      "description": "Declared `PROJECT` axis, inherited from the diary.",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "quality": {
      "type": "string",
      "description": "`poor`)",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "`acceptable`\\"
    },
    "subject": {
      "type": "string",
      "description": "What the photograph physically shows.",
      "x-demiton-requiredness": "required"
    },
    "concerns": {
      "type": "array",
      "description": "Review flags; the vision enum is `identifiable_people`, `vehicle_plate`, `third_party_branding`, `unsafe_practice_visible`, `poor_legibility`, `not_construction`.",
      "x-demiton-requiredness": "optional"
    },
    "work_type": {
      "type": "string",
      "description": "The civil work visible, or the literal `none_visible`.",
      "x-demiton-requiredness": "optional"
    },
    "fact_class": {
      "type": "string",
      "description": "Provenance class: this fact is a model's reading of an image, not a value the source reported.",
      "x-demiton-requiredness": "required"
    },
    "occurred_at": {
      "type": "string",
      "description": "Time of the parent diary event, inherited unchanged; the observation has no independent event time.",
      "x-demiton-requiredness": "required",
      "format": "date-time",
      "x-demiton-type": "datetime"
    },
    "photo_index": {
      "type": "integer",
      "description": "Zero-based ordinal of the photo within the diary, assigned in `_photo_urls` order; the other half of the identity.",
      "x-demiton-requiredness": "required"
    },
    "legal_entity": {
      "type": "string",
      "description": "Declared `LEGAL_ENTITY` axis, inherited from the diary.",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "source_image": {
      "type": "object",
      "description": "Dimensions and container format of the fetched image, from the encoder.",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "px / —"
    },
    "observation_id": {
      "type": "string",
      "description": "Stable identity of the per-photo observation: `{parent diary source id}:{photo ordinal}`. Maps to `Fact.source_id`/`external_id`.",
      "x-demiton-requiredness": "required"
    },
    "financial_period": {
      "type": "string",
      "description": "Declared `FINANCIAL_PERIOD` axis; derived from `occurred_at` when not inherited.",
      "x-demiton-requiredness": "required",
      "format": "date",
      "x-demiton-type": "date"
    },
    "parent_diary_source_id": {
      "type": "string",
      "description": "Source id of the `site_diary` fact this photo belongs to; the join back to the diary and the prefix of `observation_id`.",
      "x-demiton-requiredness": "required"
    }
  },
  "x-demiton-register-type": "diary_photo_observation",
  "x-demiton-contract-version": "1.0.3",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [
    {
      "axis": "project",
      "requirement": "optional",
      "role": "subject"
    },
    {
      "axis": "asset",
      "requirement": "optional",
      "role": "subject"
    },
    {
      "axis": "legal_entity",
      "requirement": "optional",
      "role": "context"
    },
    {
      "axis": "financial_period",
      "requirement": "required",
      "role": "context"
    }
  ],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "AS/NZS ISO 14001:2016",
        "title": "Environmental management systems",
        "access": "paywalled_secondary",
        "clause": "10.2",
        "region": "Australia",
        "edition": "2016 (adopts ISO 14001:2015)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "AS/NZS ISO 45001:2018",
        "title": "Occupational health and safety management systems",
        "access": "paywalled_secondary",
        "clause": "6.1.2.1, 6.1.2.2, 8.1, 10.2",
        "region": "Australia",
        "edition": "2018 incl. Amd 1:2024",
        "checked_on": "2026-09-14"
      },
      {
        "code": "AS/NZS ISO 9001:2016",
        "title": "Quality management systems - Requirements",
        "access": "paywalled_secondary",
        "clause": "7.5, 8.7, 10.2",
        "region": "Australia",
        "edition": "2016 (adopts ISO 9001:2015)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "GDA2020 / MGA2020",
        "title": "Geocentric Datum of Australia 2020",
        "access": "full_text_verified",
        "region": "Australia",
        "edition": "GDA2020",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO 14001:2026",
        "title": "Environmental management systems",
        "access": "paywalled_secondary",
        "clause": "10.2",
        "region": "International",
        "edition": "2026 (published 2026-04-15)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO 45001:2018",
        "title": "Occupational health and safety management systems",
        "access": "paywalled_secondary",
        "clause": "6.1.2.1, 6.1.2.2, 8.1, 10.2",
        "region": "International",
        "edition": "2018 incl. Amd 1:2024",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO 9001:2015",
        "title": "Quality management systems - Requirements",
        "access": "paywalled_secondary",
        "clause": "7.5, 8.7, 10.2",
        "region": "International",
        "edition": "2015 (ISO 9001:2026 successor expected; unverified)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Health and Safety at Work Act 2015 (NZ)",
        "title": "Records of notifiable events",
        "access": "public_summary",
        "region": "New Zealand",
        "edition": "as amended",
        "checked_on": "2026-09-14"
      },
      {
        "code": "29 CFR Part 1904",
        "title": "OSHA Recording and Reporting Occupational Injuries and Illnesses",
        "access": "full_text_verified",
        "clause": "1904.33",
        "region": "United States",
        "edition": "as amended",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "What a site diary photo shows (subject, work type, quality, concerns), read from the image.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/diary_photo_observation/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}