{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/maintenance_record/v2.json",
  "title": "maintenance_record contract v2",
  "type": "object",
  "required": [
    "asset",
    "external_id",
    "occurred_at"
  ],
  "properties": {
    "asset": {
      "type": "string",
      "description": "the item of plant the record is about",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "worker": {
      "type": "number",
      "description": "the worker who submitted the form; an anchor, not a declared axis",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "form_id": {
      "type": "number",
      "description": "the source form template identity",
      "x-demiton-requiredness": "optional"
    },
    "project": {
      "type": "number",
      "description": "the project the plant was working on when serviced",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "currency": {
      "type": "currency",
      "description": "the currency of `service_cost`, an ISO 4217 alpha-3 code as the source states it. A record with no currency has no usable amount.",
      "x-demiton-requiredness": "optional"
    },
    "location": {
      "type": "string",
      "description": "the place named on the form where the work happened",
      "x-demiton-requiredness": "optional"
    },
    "certifier": {
      "type": "string",
      "description": "the competent person who performed or certified the service",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "unplanned": {
      "type": "boolean",
      "description": "1 when this maintenance event was a breakdown, 0 when it was planned work",
      "x-demiton-requiredness": "tenant-specific"
    },
    "asset_hint": {
      "type": "string",
      "description": "the free-text machine name the form carries when the top-level asset id is empty, used to resolve the `asset` anchor",
      "x-demiton-requiredness": "optional"
    },
    "asset_type": {
      "type": "string",
      "description": "the plant type named on the form (e.g. the machine class)",
      "x-demiton-requiredness": "optional"
    },
    "form_title": {
      "type": "string",
      "description": "the tenant's own name for the maintenance form the record was captured on; the key the SAS value-map is bound to",
      "x-demiton-requiredness": "tenant-specific"
    },
    "external_id": {
      "type": "string",
      "description": "the source form-result's own identifier, as text",
      "x-demiton-requiredness": "required"
    },
    "next_due_at": {
      "type": "string",
      "description": "the date the next inspection/service falls due",
      "x-demiton-requiredness": "optional",
      "format": "date",
      "x-demiton-type": "date"
    },
    "occurred_at": {
      "type": "string",
      "description": "when the maintenance record was submitted; the date the retention clock runs from",
      "x-demiton-requiredness": "required",
      "x-demiton-unit": "instant",
      "format": "date-time",
      "x-demiton-type": "datetime"
    },
    "jurisdiction": {
      "type": "jurisdiction",
      "description": "the WHS/examination regime whose interval and retention rule apply",
      "x-demiton-requiredness": "optional"
    },
    "labour_hours": {
      "type": "number",
      "description": "labour hours booked to the service",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "hours",
      "x-demiton-type": "decimal"
    },
    "service_cost": {
      "type": "number",
      "description": "the total cost of the service",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "decimal"
    },
    "service_date": {
      "type": "string",
      "description": "the date carried on the form, where it differs from submission time",
      "x-demiton-requiredness": "optional",
      "format": "date",
      "x-demiton-type": "date"
    },
    "source_units": {
      "type": "object",
      "description": "the source unit each measure arrived in, beside the canonical unit",
      "x-demiton-requiredness": "optional"
    },
    "machine_hours": {
      "type": "number",
      "description": "operating-hour meter reading at the time of service — the preferred hour source",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "hours",
      "x-demiton-type": "decimal"
    },
    "interval_basis": {
      "type": "string",
      "description": "why the next inspection/service is due — statutory interval, a competent person's examination scheme, or the manufacturer's recommendation",
      "x-demiton-requiredness": "optional"
    },
    "tenant_payload": {
      "type": "object",
      "description": "the tenant's own form questions and answers — servicing notes, faults found, parts, cost components, media/signature answers",
      "x-demiton-requiredness": "tenant-specific"
    },
    "inspection_class": {
      "type": "string",
      "description": "pre-operational / routine / major inspection or service",
      "x-demiton-requiredness": "optional"
    },
    "hour_meter_reading": {
      "type": "number",
      "description": "the second form family's hour/odometer reading at service",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "hours (**unverified**)",
      "x-demiton-type": "decimal"
    }
  },
  "x-demiton-register-type": "maintenance_record",
  "x-demiton-contract-version": "2.1.1",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [
    {
      "axis": "asset",
      "requirement": "required",
      "role": "subject"
    },
    {
      "axis": "project",
      "requirement": "optional",
      "role": "subject"
    }
  ],
  "x-demiton-measures": [
    {
      "key": "hour_meter_reading",
      "accumulation": "instantaneous",
      "dtype": "float",
      "unit": "hours"
    },
    {
      "key": "labour_hours",
      "accumulation": "additive",
      "dtype": "float",
      "unit": "hours"
    },
    {
      "key": "machine_hours",
      "accumulation": "instantaneous",
      "dtype": "float",
      "unit": "hours"
    },
    {
      "key": "service_cost",
      "accumulation": "additive",
      "dtype": "decimal",
      "unit": "AUD"
    },
    {
      "key": "unplanned",
      "accumulation": "additive",
      "dtype": "boolean",
      "unit": "dimensionless"
    }
  ],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "AS 2550.10",
        "title": "Cranes, hoists and winches - Safe use - Mobile elevating work platforms",
        "access": "paywalled_secondary",
        "region": "Australia",
        "edition": "2025",
        "checked_on": "2026-09-14"
      },
      {
        "code": "AS/NZS 1418.10",
        "title": "Cranes, hoists and winches - Mobile elevating work platforms (design and construction)",
        "access": "paywalled_secondary",
        "region": "Australia",
        "edition": "2025",
        "checked_on": "2026-09-14"
      },
      {
        "code": "GDA2020 / MGA2020",
        "title": "Geocentric Datum of Australia 2020 and Map Grid of Australia 2020 (EPSG:7844 / EPSG:78xx zones)",
        "access": "public_summary",
        "region": "Australia",
        "edition": "GDA2020 = ITRF2014 at epoch 2020.0",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Model WHS Act",
        "title": "Model Work Health and Safety Act (Safe Work Australia)",
        "access": "full_text_verified",
        "clause": "s 38(7)",
        "region": "Australia",
        "edition": "model Bill 1 August 2023",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Model WHS Regulations",
        "title": "Model Work Health and Safety Regulations (Safe Work Australia; given effect by each state/territory)",
        "access": "full_text_verified",
        "clause": "regs 224, 226, 235, 235(4), 237, 242(1A)",
        "region": "Australia",
        "edition": "as amended 5 December 2025",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO 55001",
        "title": "Asset management - Asset management system - Requirements",
        "access": "paywalled_secondary",
        "clause": "8.1; 10.3",
        "region": "International",
        "edition": "2024 (AS ISO 55001:2024 identical AU adoption)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO/TS 15143-3",
        "title": "Earth-moving machinery and mobile road construction machinery - Worksite data exchange - Telematics data (AEMP 2.0)",
        "access": "paywalled_secondary",
        "region": "International",
        "edition": "2020 (SA TS ISO 15143.3:2021 AU and PD ISO/TS 15143-3:2020 UK identical adoptions)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Health and Safety at Work Act 2015 (NZ)",
        "title": "Health and Safety at Work Act 2015",
        "access": "full_text_verified",
        "clause": "s 25",
        "region": "New Zealand",
        "edition": "version as at 5 April 2025",
        "checked_on": "2026-09-14"
      },
      {
        "code": "LOLER 1998",
        "title": "Lifting Operations and Lifting Equipment Regulations 1998",
        "access": "public_summary",
        "clause": "Schedule 1",
        "region": "United Kingdom",
        "edition": "1998 (with HSE ACOP)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "RIDDOR 2013 (SI 2013/1471)",
        "title": "Reporting of Injuries, Diseases and Dangerous Occurrences Regulations 2013",
        "access": "full_text_verified",
        "clause": "Sch 2 Part 1 item 1",
        "region": "United Kingdom",
        "edition": "2013",
        "checked_on": "2026-09-14"
      },
      {
        "code": "29 CFR 1904.39",
        "title": "OSHA - Reporting fatalities, hospitalizations, amputations and losses of an eye",
        "access": "full_text_verified",
        "region": "United States",
        "edition": "eCFR current",
        "checked_on": "2026-09-14"
      },
      {
        "code": "29 CFR 1910.179",
        "title": "OSHA - Overhead and gantry cranes",
        "access": "full_text_verified",
        "clause": "(j)",
        "region": "United States",
        "edition": "eCFR current (read 2026-09-01 point in time)",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "Plant service and maintenance records.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/maintenance_record/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}