club.fellas.v0.poll.vote

A member's vote on a poll within the fella space. Convention: rkey equals the poll record's rkey, so casting a new vote overwrites the previous one (via applyWrites update) rather than creating a second record.

Repository @cam.fellas.club did:plc:ctpw7nnpcnuxey7ckqi66mxz not from the namespace authority
Details · record, key any
Kindrecord
Record keyany
Authoritypoll.v0.fellas.club
Indexed
cid bafyreicsvv2ljppm63nbseo753v7po2laxnoyw7buhr2qxngjtz5gkimjm

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A member's vote on a poll within the fella space. Convention: rkey equals the poll record's rkey, so casting a new vote overwrites the previous one (via applyWrites update) rather than creating a second record.",
      "key": "any",
      "record": {
        "properties": {
          "choice": {
            "refs": [
              "#singleChoice",
              "#rankedChoice"
            ],
            "type": "union"
          },
          "poll": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "votedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "poll",
          "choice",
          "votedAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "rankedChoice": {
      "properties": {
        "ranking": {
          "description": "Option ids (see singleChoice.optionId for what that means per optionsMode), ordered best-to-worst. Options left out are treated as tied-last.",
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxLength": 32,
          "minLength": 1,
          "type": "array"
        }
      },
      "required": [
        "ranking"
      ],
      "type": "object"
    },
    "singleChoice": {
      "properties": {
        "optionId": {
          "description": "A stringified array index into the poll's options (optionsMode 'author') or a club.fellas.v0.poll.option record's rkey (optionsMode 'group').",
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "optionId"
      ],
      "type": "object"
    }
  },
  "id": "club.fellas.v0.poll.vote",
  "lexicon": 1
}