{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A film a user owns in a given format (their Library). No parent record — the Library is the umbrella over these items.",
      "key": "tid",
      "record": {
        "properties": {
          "boxSet": {
            "description": "Optional named box set this item belongs to",
            "type": "string"
          },
          "createdAt": {
            "description": "Record creation timestamp",
            "format": "datetime",
            "type": "string"
          },
          "episodeNumber": {
            "description": "Episode number for episode items",
            "type": "integer"
          },
          "format": {
            "description": "The medium the item is owned in",
            "enum": [
              "digital",
              "bluray",
              "bluray4k",
              "dvd"
            ],
            "type": "string"
          },
          "mediaId": {
            "description": "TMDB movie ID or show ID",
            "type": "string"
          },
          "mediaType": {
            "description": "Media type",
            "enum": [
              "movie",
              "show",
              "season",
              "episode"
            ],
            "type": "string"
          },
          "notes": {
            "description": "Optional user notes about the owned item",
            "type": "string"
          },
          "seasonNumber": {
            "description": "Season number for season/episode items",
            "type": "integer"
          }
        },
        "required": [
          "mediaType",
          "mediaId",
          "format",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "xyz.opnshelf.library.item",
  "lexicon": 1
}
