# club.fellas.v0.poll.vote

> Published by [cam.fellas.club](https://lexicon.garden/identity/did:plc:ctpw7nnpcnuxey7ckqi66mxz)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ctpw7nnpcnuxey7ckqi66mxz/club.fellas.v0.poll.vote)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ctpw7nnpcnuxey7ckqi66mxz/club.fellas.v0.poll.vote/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ctpw7nnpcnuxey7ckqi66mxz/club.fellas.v0.poll.vote/examples)

## Definitions

### `club.fellas.v0.poll.vote`

**Type**: `record`

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`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `choice` | `union` | Yes |  |
| `poll` | `ref` → `com.atproto.repo.strongRef` | Yes |  |
| `votedAt` | `string` (datetime) | Yes |  |

### `club.fellas.v0.poll.vote#rankedChoice`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `ranking` | `array` | Yes | Option ids (see singleChoice.optionId for what that means per optionsMode), ordered best-to-worst. Options left out are treated as tied-last. |

### `club.fellas.v0.poll.vote#singleChoice`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `optionId` | `string` | Yes | A stringified array index into the poll's options (optionsMode 'author') or a club.fellas.v0.poll.option record's rkey (optionsMode 'group'). |

## Raw Schema

```json
{
  "$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
}
```
