# app.studynext.deckMetadata

> 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.

- Kind: record
- Record key: any
- Authority: studynext.app
- Lexicon: 1
- Published by [studynext.app](https://lexicon.garden/identity/did:plc:nstib2qjcu3tyun7cxz4dxcm), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.deckMetadata)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.deckMetadata/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.deckMetadata/analytics)

## Record (`app.studynext.deckMetadata`)

Type: record · key any

### Properties

- `ankiModels` (string): Serialized Anki model metadata retained for import/export.
- `ankiSourceDeckId` (integer): Source deck id from the imported Anki package.
- `deckId` (string, required): Flashcard deck id and this record's rkey. Preserve the full identifier without truncation.
- `parentId` (string): Parent deck id; absent for a top-level deck.
- `parentIdRemoved` (boolean): Explicit marker that clears a previously sidecar-preserved parentId. True is meaningful; absent means no explicit clearing marker.
- `planId` (string): Owning plan id for a deck dedicated to a problem-by-problem plan.
  - Constraints: maxLength: 100

## Schema

```json
{
  "$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
}
```
