{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "review": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "rootingFor": {
            "description": "Team or person record the fan was pulling for, if any.",
            "format": "at-uri",
            "type": "string"
          },
          "spoilers": {
            "description": "True if the review gives away the result; viewers hide it until opened.",
            "type": "boolean"
          },
          "stars": {
            "description": "Half stars: 1 = half a star, 10 = five stars.",
            "maximum": 10,
            "minimum": 1,
            "type": "integer"
          },
          "subject": {
            "description": "The com.professorbutts.sports.game or leaderboard record. A uri, not a strongRef, because game records are rewritten in place.",
            "format": "at-uri",
            "type": "string"
          },
          "subjectCid": {
            "description": "Optional: the version the fan saw, for display/audit only.",
            "format": "cid",
            "type": "string"
          },
          "watched": {
            "knownValues": [
              "live",
              "replay",
              "highlights",
              "venue"
            ],
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "subject",
          "stars",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A fan's rating of a finished game or event, kept in the fan's own repo. One per fan per event: the record key is the subject's record key, so rating again replaces it. Older records may use a TID key. Together they make a Letterboxd-style game log.",
  "id": "com.professorbutts.sports.rating",
  "lexicon": 1
}
