{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "imports-v2/card_time_logs.json",
  "title": "Card time logs",
  "description": "A finished entry of time that a person spent on a card, in minutes, for example 180 minutes on 2026-01-21. Each entry names a user and the day of work. The entry is logged under the built-in role Employee. The time of a stopped timer is recorded here as a finished entry; timers that are still running are not imported. Without `author_ref` the user whose time it is counts as the author.",
  "type": "object",
  "properties": {
    "external_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "description": "Your own identifier of the record, for example `k-mrr`, unique within the resource across all of its files and case sensitive. Other records refer to this one by it."
    },
    "card_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "x-ref": "cards",
      "description": "The card the time was spent on. Give the external_id of a `cards` record."
    },
    "user_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "x-ref": "users",
      "description": "The person whose time is logged. Give the external_id of a `users` record."
    },
    "author_ref": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 512,
      "x-ref": "users",
      "description": "The user who entered the record; it defaults to `user_ref`. Give the external_id of a `users` record.",
      "x-default-text": "user_ref"
    },
    "time_spent": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991,
      "description": "Time spent, in whole minutes, at least 1. For example 180 is three hours."
    },
    "for_date": {
      "type": "string",
      "format": "date",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "The day the work was done, `YYYY-MM-DD`."
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 32767,
      "description": "A note about the work, up to 32767 characters."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$",
      "description": "When the record was created, with a time zone, for example `2026-01-12T09:30:00Z`.",
      "x-default-text": "source.exported_at of the manifest"
    }
  },
  "required": [
    "external_id",
    "card_ref",
    "user_ref",
    "time_spent",
    "for_date"
  ],
  "additionalProperties": false
}
