{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A user review of an AT Store directory listing. Subject must be the at:// URI of a fyi.atstore.listing.detail record.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "rating": {
            "description": "Star rating 1–5.",
            "maximum": 5,
            "minimum": 1,
            "type": "integer"
          },
          "subject": {
            "description": "AT URI of the fyi.atstore.listing.detail record being reviewed.",
            "format": "at-uri",
            "type": "string"
          },
          "text": {
            "description": "Optional written review; omit for a stars-only rating.",
            "maxLength": 8000,
            "type": "string"
          }
        },
        "required": [
          "subject",
          "rating",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "fyi.atstore.listing.review",
  "lexicon": 1
}
