{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/job_budget/v2.json",
  "title": "job_budget contract v2",
  "type": "object",
  "required": [
    "currency",
    "financial_period",
    "legal_entity_id",
    "project_id",
    "total_budget"
  ],
  "properties": {
    "currency": {
      "type": "currency",
      "description": "the currency of every amount on this record (`total_budget`), an ISO 4217 alpha-3 code as the source states it. A record with no currency has no usable amount.",
      "x-demiton-requiredness": "required"
    },
    "project_id": {
      "type": "string",
      "description": "The project the budget belongs to; the fact's subject anchor, read by Margin Watch.",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "total_budget": {
      "type": "number",
      "description": "the budgeted amount for the project, summed over all planning lines",
      "x-demiton-requiredness": "required",
      "x-demiton-type": "decimal"
    },
    "legal_entity_id": {
      "type": "string",
      "description": "the BC company whose job planning lines the budget was read from",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "financial_period": {
      "type": "string",
      "description": "the accounting period the budget figure is the live value for",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "by_expense_category": {
      "type": "object",
      "description": "the same total broken down by the GL classification the planning-line accounts map to",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "AUD per key"
    },
    "planning_line_count": {
      "type": "integer",
      "description": "number of salary planning lines folded into the total",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "count"
    }
  },
  "x-demiton-register-type": "job_budget",
  "x-demiton-contract-version": "2.0.1",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [
    {
      "axis": "legal_entity",
      "requirement": "optional",
      "role": "context"
    },
    {
      "axis": "financial_period",
      "requirement": "optional",
      "role": "context"
    }
  ],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": []
  },
  "description": "Job budgets per project, by expense category.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/job_budget/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}