{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Optional metadata sidecar for a flashcard deck. rkey equals deckId. The sidecar preserves hierarchy, plan ownership, and Anki import metadata separately from the replaceable deck record; it remains publicly readable in the user's PDS.",
      "key": "any",
      "record": {
        "properties": {
          "ankiModels": {
            "description": "Serialized Anki model metadata retained for import/export.",
            "type": "string"
          },
          "ankiSourceDeckId": {
            "description": "Source deck id from the imported Anki package.",
            "type": "integer"
          },
          "deckId": {
            "description": "Flashcard deck id and this record's rkey. Preserve the full identifier without truncation.",
            "type": "string"
          },
          "parentId": {
            "description": "Parent deck id; absent for a top-level deck.",
            "type": "string"
          },
          "parentIdRemoved": {
            "description": "Explicit marker that clears a previously sidecar-preserved parentId. True is meaningful; absent means no explicit clearing marker.",
            "type": "boolean"
          },
          "planId": {
            "description": "Owning plan id for a deck dedicated to a problem-by-problem plan.",
            "maxLength": 100,
            "type": "string"
          }
        },
        "required": [
          "deckId"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.studynext.deckMetadata",
  "lexicon": 1
}
