{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/runn/json-schema/runn-assignment-schema.json",
  "title": "Assignment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/runn-assignments-api-openapi.yml#/components/schemas/Assignment",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique identifier for the assignment.",
      "type": "integer"
    },
    "personId": {
      "description": "id referencing the person associated with the assignment.",
      "type": "integer"
    },
    "startDate": {
      "type": "string",
      "format": "date",
      "description": "The start date of the assignment. Format: YYYY-MM-DD"
    },
    "endDate": {
      "type": "string",
      "format": "date",
      "description": "The end date of the assignment. Format: YYYY-MM-DD"
    },
    "projectId": {
      "description": "The ID referencing the project to which the assignment belongs.",
      "type": "integer"
    },
    "minutesPerDay": {
      "description": "The number of minutes allocated to the assignment per day.",
      "type": "integer"
    },
    "roleId": {
      "description": "The ID referencing the role associated with the assignment.",
      "type": "integer"
    },
    "isActive": {
      "description": "A flag indicating whether the assignment is currently active. (Deprecated. Assignments are always hard delete so are now always active).",
      "deprecated": true,
      "type": "boolean"
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "isBillable": {
      "description": "A flag indicating whether the assignment is billable.",
      "type": "boolean"
    },
    "phaseId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "isNonWorkingDay": {
      "description": "A flag indicating if the assignment falls on a non-working day.",
      "type": "boolean"
    },
    "isTemplate": {
      "description": "A flag indicating if the assignment is a template.",
      "type": "boolean"
    },
    "isPlaceholder": {
      "description": "A flag indicating if the assignment's person is a placeholder.",
      "type": "boolean"
    },
    "workstreamId": {
      "type": [
        "number",
        "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",
    "personId",
    "startDate",
    "endDate",
    "projectId",
    "minutesPerDay",
    "roleId",
    "isActive",
    "note",
    "isBillable",
    "phaseId",
    "isNonWorkingDay",
    "isTemplate",
    "isPlaceholder",
    "workstreamId",
    "createdAt",
    "updatedAt"
  ]
}