# com.professorbutts.sports.award

> Recommended key: '<contest rkey>-<kind>-<first 16 hex of sha256(subject DID)>', so a fan gets at most one award of each kind per contest.

- Kind: record
- Record key: any
- Authority: sports.professorbutts.com
- Lexicon: 1
- Published by [professorbutts.com](https://lexicon.garden/identity/did:plc:x6njyeyi47bqs2kueuv3mrg5), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.award)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.award/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.award/analytics)

## Record (`com.professorbutts.sports.award`)

Type: record · key any

### Properties

- `contest` (string · at-uri, required): The com.professorbutts.sports.contest record (or another contest-like record) the award is for.
- `contestCid` (string · cid): Optional CID of the contest version the final standings were computed from.
- `correct` (integer)
  - Constraints: minimum: 0
- `entrants` (integer)
  - Constraints: minimum: 1
- `graded` (integer)
  - Constraints: minimum: 0
- `image` (blob): Optional badge art.
  - Constraints: maxSize: 1000000, accept: image/png, image/webp
- `imageAlt` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `issuedAt` (string · datetime, required)
- `kind` (string, required)
  - Constraints: maxLength: 128, knownValues: com.professorbutts.sports.award#champion | com.professorbutts.sports.award#runnerUp | com.professorbutts.sports.award#third | com.professorbutts.sports.award#perfect
- `league` (string): League code as used in game records, e.g. 'NCAAF'.
  - Constraints: maxLength: 32
- `points` (integer)
- `rank` (integer): Final rank; ties share a rank.
  - Constraints: minimum: 1
- `season` (string)
  - Constraints: maxLength: 32
- `standings` (string · uri): Public page with the final standings.
  - Constraints: maxLength: 512
- `status` (string): Absent means active. Revoked awards (a grading correction) stay as a record so badges pointing at them can say why; readers must not show a revoked award as earned.
  - Constraints: maxLength: 32, knownValues: active | revoked
- `statusReason` (string)
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `subject` (string · did, required): The fan who earned it.
- `tied` (boolean): True when another fan shares this rank.
- `title` (string, required): Short display title, e.g. 'FCS Playoff Pick'em champion'.
  - Constraints: maxLength: 640, maxGraphemes: 64
- `updatedAt` (string · datetime)

## #champion (`com.professorbutts.sports.award#champion`)

Type: token

Finished first (ties share it).

## #perfect (`com.professorbutts.sports.award#perfect`)

Type: token

Every graded pick was correct (at least one game).

## #runnerUp (`com.professorbutts.sports.award#runnerUp`)

Type: token

Finished second.

## #third (`com.professorbutts.sports.award#third`)

Type: token

Finished third.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "champion": {
      "description": "Finished first (ties share it).",
      "type": "token"
    },
    "main": {
      "description": "Recommended key: '<contest rkey>-<kind>-<first 16 hex of sha256(subject DID)>', so a fan gets at most one award of each kind per contest.",
      "key": "any",
      "record": {
        "properties": {
          "contest": {
            "description": "The com.professorbutts.sports.contest record (or another contest-like record) the award is for.",
            "format": "at-uri",
            "type": "string"
          },
          "contestCid": {
            "description": "Optional CID of the contest version the final standings were computed from.",
            "format": "cid",
            "type": "string"
          },
          "correct": {
            "minimum": 0,
            "type": "integer"
          },
          "entrants": {
            "minimum": 1,
            "type": "integer"
          },
          "graded": {
            "minimum": 0,
            "type": "integer"
          },
          "image": {
            "accept": [
              "image/png",
              "image/webp"
            ],
            "description": "Optional badge art.",
            "maxSize": 1000000,
            "type": "blob"
          },
          "imageAlt": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "issuedAt": {
            "format": "datetime",
            "type": "string"
          },
          "kind": {
            "knownValues": [
              "com.professorbutts.sports.award#champion",
              "com.professorbutts.sports.award#runnerUp",
              "com.professorbutts.sports.award#third",
              "com.professorbutts.sports.award#perfect"
            ],
            "maxLength": 128,
            "type": "string"
          },
          "league": {
            "description": "League code as used in game records, e.g. 'NCAAF'.",
            "maxLength": 32,
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "rank": {
            "description": "Final rank; ties share a rank.",
            "minimum": 1,
            "type": "integer"
          },
          "season": {
            "maxLength": 32,
            "type": "string"
          },
          "standings": {
            "description": "Public page with the final standings.",
            "format": "uri",
            "maxLength": 512,
            "type": "string"
          },
          "status": {
            "description": "Absent means active. Revoked awards (a grading correction) stay as a record so badges pointing at them can say why; readers must not show a revoked award as earned.",
            "knownValues": [
              "active",
              "revoked"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "statusReason": {
            "maxGraphemes": 100,
            "maxLength": 1000,
            "type": "string"
          },
          "subject": {
            "description": "The fan who earned it.",
            "format": "did",
            "type": "string"
          },
          "tied": {
            "description": "True when another fan shares this rank.",
            "type": "boolean"
          },
          "title": {
            "description": "Short display title, e.g. 'FCS Playoff Pick'em champion'.",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "subject",
          "contest",
          "kind",
          "title",
          "issuedAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "perfect": {
      "description": "Every graded pick was correct (at least one game).",
      "type": "token"
    },
    "runnerUp": {
      "description": "Finished second.",
      "type": "token"
    },
    "third": {
      "description": "Finished third.",
      "type": "token"
    }
  },
  "description": "An award issued by a contest's publisher to one fan, e.g. the champion of a pick'em contest. Lives in the issuer's repo; the fan can keep it on their profile with a com.professorbutts.sports.badge record that points here. An award is genuine when it is in the contest publisher's repo and its subject is the fan.",
  "id": "com.professorbutts.sports.award",
  "lexicon": 1
}
```
