# social.pmsky.vote

> Published by [pmsky.social](https://lexicon.garden/identity/did:plc:xhkqwjmxuo65vwbwuiz53qor)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:xhkqwjmxuo65vwbwuiz53qor/social.pmsky.vote)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xhkqwjmxuo65vwbwuiz53qor/social.pmsky.vote/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xhkqwjmxuo65vwbwuiz53qor/social.pmsky.vote/examples)

## Definitions

### `social.pmsky.vote`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `aid` | `string` | No | The persistent, anonymous identifier for the user casting the vote. |
| `cid` | `string` (cid) | No | Optionally, CID specifying the specific version of 'uri' resource this vote applies to. |
| `cts` | `string` (datetime) | Yes | Timestamp when this vote was created. |
| `sig` | `bytes` | No | Signature of dag-cbor encoded vote. |
| `src` | `string` (did) | Yes | the account creating the vote, not necessarily the same as the user who voted |
| `uri` | `string` (uri) | Yes | AT URI of the record, repository (account), or other resource that this vote applies to. |
| `val` | `integer` | Yes | The value of the vote. The exact meaning depends on what is being voted on, but generally '+1' means 'approval', -1 means 'disapproval', and 0 indicates 'neutrality'. |
| `reasons` | `array` | No | An optional array of predefined reasons justifying the vote. |

## Raw Schema

```json
{
  "id": "social.pmsky.vote",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "src",
          "uri",
          "val",
          "cts"
        ],
        "properties": {
          "aid": {
            "type": "string",
            "description": "The persistent, anonymous identifier for the user casting the vote."
          },
          "cid": {
            "type": "string",
            "format": "cid",
            "description": "Optionally, CID specifying the specific version of 'uri' resource this vote applies to."
          },
          "cts": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp when this vote was created."
          },
          "sig": {
            "type": "bytes",
            "description": "Signature of dag-cbor encoded vote."
          },
          "src": {
            "type": "string",
            "format": "did",
            "description": "the account creating the vote, not necessarily the same as the user who voted"
          },
          "uri": {
            "type": "string",
            "format": "uri",
            "description": "AT URI of the record, repository (account), or other resource that this vote applies to."
          },
          "val": {
            "type": "integer",
            "description": "The value of the vote. The exact meaning depends on what is being voted on, but generally '+1' means 'approval', -1 means 'disapproval', and 0 indicates 'neutrality'."
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "An optional array of predefined reasons justifying the vote."
          }
        },
        "description": "A vote record, representing a user's approval or disapproval of the referenced resource. The resource my be a proposal, a post, a web page, or anything that can be agreed or disagreed with."
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
