# net.neodb.defs

> Published by [neodb.net](https://lexicon.garden/identity/did:plc:ui2d3qu2ltydsyskmnuvi4ay)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ui2d3qu2ltydsyskmnuvi4ay/net.neodb.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ui2d3qu2ltydsyskmnuvi4ay/net.neodb.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ui2d3qu2ltydsyskmnuvi4ay/net.neodb.defs/examples)

## Definitions

### `net.neodb.defs#rating`

**Type**: `object`

A numeric rating on a 1..max scale.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `max` | `integer` | Yes |  |
| `value` | `integer` | Yes |  |

### `net.neodb.defs#subject`

**Type**: `object`

Inline reference to a catalog work. NeoDB items are not ATProto records, so a work is referenced by URL (its NeoDB permalink and source site URLs) rather than a strongRef.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (uri) | Yes | Permalink to the work on the originating NeoDB instance. |
| `type` | `string` | Yes | Specific NeoDB item class (mirrors the NeoDB API schema), distinguishing entities that share a category, e.g. TVShow / TVSeason / TVEpisode, Podcast / PodcastEpisode, Performance / PerformanceProduction, Edition, Movie, Album, Game. |
| `cover` | `string` (uri) | No | Absolute URL of the work's cover image, when present. |
| `title` | `string` | Yes | Display title of the work. |
| `sources` | `array` | No | URLs of the external source records the work was matched from (IMDB, TMDB, Douban, Goodreads, etc.), referenced by URL rather than raw id. |
| `category` | `string` | Yes | Broad media category of the work. Open set; future NeoDB versions may add values. |
| `identifiers` | `array` | No | Standardized identifiers of the work. Only standard, site-independent identifier types are included (e.g. isbn, imdb, wikidata, asin, gtin, isrc); site-specific ids are conveyed as URLs in sources instead. |

### `net.neodb.defs#identifier`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes | Identifier namespace, e.g. isbn, imdb, wikidata. |
| `value` | `string` | Yes |  |

## Raw Schema

```json
{
  "id": "net.neodb.defs",
  "defs": {
    "rating": {
      "type": "object",
      "required": [
        "value",
        "max"
      ],
      "properties": {
        "max": {
          "type": "integer",
          "minimum": 1
        },
        "value": {
          "type": "integer",
          "maximum": 10,
          "minimum": 1
        }
      },
      "description": "A numeric rating on a 1..max scale."
    },
    "subject": {
      "type": "object",
      "required": [
        "uri",
        "category",
        "type",
        "title"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "Permalink to the work on the originating NeoDB instance."
        },
        "type": {
          "type": "string",
          "description": "Specific NeoDB item class (mirrors the NeoDB API schema), distinguishing entities that share a category, e.g. TVShow / TVSeason / TVEpisode, Podcast / PodcastEpisode, Performance / PerformanceProduction, Edition, Movie, Album, Game."
        },
        "cover": {
          "type": "string",
          "format": "uri",
          "description": "Absolute URL of the work's cover image, when present."
        },
        "title": {
          "type": "string",
          "maxLength": 2000,
          "description": "Display title of the work.",
          "maxGraphemes": 1000
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "description": "URLs of the external source records the work was matched from (IMDB, TMDB, Douban, Goodreads, etc.), referenced by URL rather than raw id."
        },
        "category": {
          "type": "string",
          "description": "Broad media category of the work. Open set; future NeoDB versions may add values.",
          "knownValues": [
            "book",
            "movie",
            "tv",
            "music",
            "game",
            "podcast",
            "performance",
            "people"
          ]
        },
        "identifiers": {
          "type": "array",
          "items": {
            "ref": "net.neodb.defs#identifier",
            "type": "ref"
          },
          "description": "Standardized identifiers of the work. Only standard, site-independent identifier types are included (e.g. isbn, imdb, wikidata, asin, gtin, isrc); site-specific ids are conveyed as URLs in sources instead."
        }
      },
      "description": "Inline reference to a catalog work. NeoDB items are not ATProto records, so a work is referenced by URL (its NeoDB permalink and source site URLs) rather than a strongRef."
    },
    "identifier": {
      "type": "object",
      "required": [
        "type",
        "value"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "Identifier namespace, e.g. isbn, imdb, wikidata."
        },
        "value": {
          "type": "string"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
