# com.divepool.rating

> Published by [divepool.com](https://lexicon.garden/identity/did:plc:lyv4wusy2mfytnmlpkika3r7)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lyv4wusy2mfytnmlpkika3r7/com.divepool.rating)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lyv4wusy2mfytnmlpkika3r7/com.divepool.rating/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lyv4wusy2mfytnmlpkika3r7/com.divepool.rating/examples)

## Definitions

### `com.divepool.rating`

**Type**: `record`

A rating gives a subject a dated integer score from 0 to 10. To re-rate, create a new record with an updated createdAt; the current score is the latest per (author, subject).

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `post` | `ref` → `com.atproto.repo.strongRef` | No | An optional Bluesky post (app.bsky.feed.post) containing the review — the author's own, or another author's being endorsed at this score |
| `text` | `string` | No | An optional text containing the review |
| `score` | `integer` | Yes | A whole number from 0 (worst) to 10 (best) |
| `subject` | `string` (uri) | Yes | What is being rated as one prefixed, ideally canonical and stable string ID (e.g. 'https:…' or 'mbid:…') |
| `document` | `ref` → `com.atproto.repo.strongRef` | No | An optional article (site.standard.document) containing the review — the author's own, or another author's being endorsed at this score |
| `createdAt` | `string` (datetime) | Yes | When this rating was made |

## Raw Schema

```json
{
  "id": "com.divepool.rating",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "subject",
          "score",
          "createdAt"
        ],
        "properties": {
          "post": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "An optional Bluesky post (app.bsky.feed.post) containing the review — the author's own, or another author's being endorsed at this score"
          },
          "text": {
            "type": "string",
            "maxLength": 3000,
            "description": "An optional text containing the review",
            "maxGraphemes": 300
          },
          "score": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "description": "A whole number from 0 (worst) to 10 (best)"
          },
          "subject": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "description": "What is being rated as one prefixed, ideally canonical and stable string ID (e.g. 'https:…' or 'mbid:…')"
          },
          "document": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "An optional article (site.standard.document) containing the review — the author's own, or another author's being endorsed at this score"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this rating was made"
          }
        }
      },
      "description": "A rating gives a subject a dated integer score from 0 to 10. To re-rate, create a new record with an updated createdAt; the current score is the latest per (author, subject)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
