# pub.quizzy.quizScore

> Final rankings for a completed quiz

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

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:2xdx57nwdfr6pxfucv5cm6lv/pub.quizzy.quizScore)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:2xdx57nwdfr6pxfucv5cm6lv/pub.quizzy.quizScore/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:2xdx57nwdfr6pxfucv5cm6lv/pub.quizzy.quizScore/analytics)

## Record (`pub.quizzy.quizScore`)

Type: record · key tid

### Properties

- `quizBegin` (ref, required): Reference to the quizBegin record
  - Reference: `com.atproto.repo.strongRef`
- `results` (array, required): Ordered list of team results (by ranking)
  - Constraints: minLength: 1, maxLength: 100
  - `items` (ref)
    - Reference: `#teamResult`

## #teamResult (`pub.quizzy.quizScore#teamResult`)

Type: object

A team's final result

### Properties

- `teamScore` (ref, required): Reference to the team's detailed score record
  - Reference: `com.atproto.repo.strongRef`
- `totalScore` (integer, required): Team's total score
  - Constraints: minimum: 0

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Final rankings for a completed quiz",
      "key": "tid",
      "record": {
        "properties": {
          "quizBegin": {
            "description": "Reference to the quizBegin record",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "results": {
            "description": "Ordered list of team results (by ranking)",
            "items": {
              "ref": "#teamResult",
              "type": "ref"
            },
            "maxLength": 100,
            "minLength": 1,
            "type": "array"
          }
        },
        "required": [
          "quizBegin",
          "results"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "teamResult": {
      "description": "A team's final result",
      "properties": {
        "teamScore": {
          "description": "Reference to the team's detailed score record",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "totalScore": {
          "description": "Team's total score",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "teamScore",
        "totalScore"
      ],
      "type": "object"
    }
  },
  "id": "pub.quizzy.quizScore",
  "lexicon": 1
}
```
