{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "imports-v2/card_members.json",
  "title": "Card members",
  "description": "A person on a card: a member who works on it, or the responsible user. Write one record per card, user and type. A card has at most one responsible user; if the same user is given both types, the user stays responsible. The import adds the users to the card with the given type. The records here are the people on the card now; `activities` may tell how they came to be there.",
  "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. Give the external_id of a `cards` record."
    },
    "user_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "x-ref": "users",
      "description": "The user who works on the card. Give the external_id of a `users` record."
    },
    "type": {
      "type": "string",
      "enum": [
        "member",
        "responsible"
      ],
      "description": "`member` for a person on the card, `responsible` for the one responsible person. A card has at most one responsible user."
    }
  },
  "required": [
    "external_id",
    "card_ref",
    "user_ref",
    "type"
  ],
  "additionalProperties": false
}
