# app.attrails.review

> Published by [attrails.app](https://lexicon.garden/identity/did:plc:q7v2r4sxk4pecbwmaucvb2vn)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.review)
- [Documentation](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.review/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.review/examples)

## Definitions

### `app.attrails.review`

**Type**: `record`

A review of a route: a 1-5 rating, optional text, and optional photos. Activity-neutral. The AppView treats the most recent review per (author, subject) as canonical.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `completedAt` | `string` (datetime) | No | When the reviewer last did the route (rode, ran, hiked), if they want to say. |
| `createdAt` | `string` (datetime) | Yes |  |
| `images` | `array` | No |  |
| `labels` | `union` | No | Self-label values for this review, e.g. to flag sensitive photos. |
| `langs` | `array` | No | Languages of this record's text (review text, image alt text), as BCP-47 tags. If absent, consumers should assume English ('en'). |
| `rating` | `integer` | Yes | Star rating from 1 (worst) to 5 (best). |
| `subject` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference to an attrails record, often an app.attrails.route record. |
| `text` | `string` | No | Review text, as CommonMark markdown. Clients must not render raw HTML. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A review of a route: a 1-5 rating, optional text, and optional photos. Activity-neutral. The AppView treats the most recent review per (author, subject) as canonical.",
      "key": "tid",
      "record": {
        "properties": {
          "completedAt": {
            "description": "When the reviewer last did the route (rode, ran, hiked), if they want to say.",
            "format": "datetime",
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "images": {
            "items": {
              "ref": "app.attrails.defs#image",
              "type": "ref"
            },
            "maxLength": 10,
            "type": "array"
          },
          "labels": {
            "description": "Self-label values for this review, e.g. to flag sensitive photos.",
            "refs": [
              "com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "langs": {
            "description": "Languages of this record's text (review text, image alt text), as BCP-47 tags. If absent, consumers should assume English ('en').",
            "items": {
              "format": "language",
              "type": "string"
            },
            "maxLength": 3,
            "type": "array"
          },
          "rating": {
            "description": "Star rating from 1 (worst) to 5 (best).",
            "maximum": 5,
            "minimum": 1,
            "type": "integer"
          },
          "subject": {
            "description": "Strong reference to an attrails record, often an app.attrails.route record.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "text": {
            "description": "Review text, as CommonMark markdown. Clients must not render raw HTML.",
            "maxGraphemes": 3000,
            "maxLength": 30000,
            "type": "string"
          }
        },
        "required": [
          "subject",
          "rating",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.attrails.review",
  "lexicon": 1
}
```
