{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/plant_charge_rate/v1.json",
  "title": "plant_charge_rate contract v1",
  "type": "object",
  "required": [
    "asset",
    "currency",
    "effective_from",
    "fuel_included",
    "ownership",
    "rate",
    "rate_unit"
  ],
  "properties": {
    "rate": {
      "type": "number",
      "description": "the charge per `rate_unit`",
      "x-demiton-requiredness": "required"
    },
    "asset": {
      "type": "string",
      "description": "the machine, by the same identifier `plant_fuel_usage.asset` carries",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "currency": {
      "type": "currency",
      "description": "the currency of `rate`, an ISO 4217 alpha-3 code. A record with no currency has no usable amount.",
      "x-demiton-requiredness": "required"
    },
    "ownership": {
      "type": "string",
      "description": "whether the contractor owns the machine or hires it in",
      "enum": [
        "owned",
        "hired"
      ],
      "x-demiton-requiredness": "required"
    },
    "rate_unit": {
      "type": "string",
      "description": "what the rate is charged per",
      "enum": [
        "hour",
        "day",
        "week"
      ],
      "x-demiton-requiredness": "required"
    },
    "tax_basis": {
      "type": "string",
      "description": "whether `rate` includes GST or VAT",
      "enum": [
        "excl_gst",
        "incl_gst"
      ],
      "x-demiton-requiredness": "optional"
    },
    "fuel_included": {
      "type": "boolean",
      "description": "true when the rate includes the machine's fuel",
      "x-demiton-requiredness": "required"
    },
    "effective_from": {
      "type": "string",
      "description": "the date the rate took effect",
      "x-demiton-requiredness": "required",
      "format": "date",
      "x-demiton-type": "date"
    }
  },
  "x-demiton-register-type": "plant_charge_rate",
  "x-demiton-contract-version": "1.0.0",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": []
  },
  "description": "The Plant charge rate register contract, version 1. JSON Schema (draft 2020-12); x-demiton-* keywords carry Demiton's own meaning and standard validators ignore them.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/plant_charge_rate/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}