# app.attrails.review

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

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

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.review)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.review/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.review/analytics)

## Record (`app.attrails.review`)

Type: record · key tid

### Properties

- `completedAt` (string · datetime): When the reviewer last did the route (rode, ran, hiked), if they want to say.
- `createdAt` (string · datetime, required)
- `images` (array)
  - Constraints: maxLength: 10
  - `items` (ref)
    - Reference: `app.attrails.defs#image`
- `labels` (union): Self-label values for this review, e.g. to flag sensitive photos.
  - One of: `com.atproto.label.defs#selfLabels`
- `langs` (array): Languages of this record's text (review text, image alt text), as BCP-47 tags. If absent, consumers should assume English ('en').
  - Constraints: maxLength: 3
  - `items` (string · language)
- `rating` (integer, required): Star rating from 1 (worst) to 5 (best).
  - Constraints: minimum: 1, maximum: 5
- `subject` (ref, required): Strong reference to an attrails record, often an app.attrails.route record.
  - Reference: `com.atproto.repo.strongRef`
- `text` (string): Review text, as CommonMark markdown. Clients must not render raw HTML.
  - Constraints: maxLength: 30000, maxGraphemes: 3000

## 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
}
```
