{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Card record",
  "type": "object",
  "additionalProperties": true,
  "required": ["deckId"],
  "properties": {
    "id": {
      "description": "Optional. Omit the key to generate a source identity; null and empty strings are invalid. Progress and history require an explicitly supplied card id.",
      "type": "string",
      "minLength": 1
    },
    "deckId": { "type": "string", "minLength": 1 },
    "createdAt": {
      "description": "Optional. Omission and null mean unavailable metadata. Malformed timestamps are rejected.",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "updatedAt": {
      "description": "Optional. Omission and null mean unavailable metadata. Malformed timestamps are rejected.",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "tagIds": {
      "type": "array",
      "default": [],
      "maxItems": 5,
      "items": { "type": "string", "minLength": 1 }
    },
    "values": {
      "description": "Omitted values become {}. Explicit null is invalid.",
      "type": "object",
      "additionalProperties": { "$ref": "field_value.schema.json" }
    }
  }
}
