{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/runn/json-schema/runn-contract-schema.json",
  "title": "Contract",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/runn-contracts-api-openapi.yml#/components/schemas/Contract",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "costPerHour": {
      "type": [
        "number",
        "null"
      ]
    },
    "employmentType": {
      "type": "string"
    },
    "minutesPerDay": {
      "type": [
        "number",
        "null"
      ]
    },
    "rosteredDays": {
      "$ref": "#/$defs/RosteredDays"
    },
    "startDate": {
      "type": "string",
      "format": "date",
      "description": "Format: YYYY-MM-DD"
    },
    "endDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Format: YYYY-MM-DD"
    },
    "roleId": {
      "type": "integer"
    },
    "personId": {
      "type": "integer"
    },
    "jobTitle": {
      "description": "This feature is currently hidden, and can not be seen in the app",
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of when the object was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of when the object was last updated."
    }
  },
  "required": [
    "id",
    "costPerHour",
    "employmentType",
    "minutesPerDay",
    "rosteredDays",
    "startDate",
    "endDate",
    "roleId",
    "personId",
    "jobTitle",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "RosteredDays": {
      "description": "Shows minutes per day working.",
      "type": "object",
      "properties": {
        "monday": {
          "type": "number"
        },
        "tuesday": {
          "type": "number"
        },
        "wednesday": {
          "type": "number"
        },
        "thursday": {
          "type": "number"
        },
        "friday": {
          "type": "number"
        }
      },
      "required": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday"
      ]
    }
  }
}