# cc.coffeencode.forum.vote

> An upvote or downvote on a post or reply. Indexers should keep the latest vote per (author, subject).

- Kind: record
- Record key: tid
- Authority: forum.coffeencode.cc
- Lexicon: 1
- Published by [coffeencode.cc](https://lexicon.garden/identity/did:plc:z7hzwpuv5ytin56wecfxa4mx), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:z7hzwpuv5ytin56wecfxa4mx/cc.coffeencode.forum.vote)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:z7hzwpuv5ytin56wecfxa4mx/cc.coffeencode.forum.vote/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:z7hzwpuv5ytin56wecfxa4mx/cc.coffeencode.forum.vote/analytics)

## Record (`cc.coffeencode.forum.vote`)

Type: record · key tid

### Properties

- `createdAt` (string · datetime, required)
- `direction` (string, required)
  - Constraints: knownValues: up | down
- `subject` (ref, required)
  - Reference: `com.atproto.repo.strongRef`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "An upvote or downvote on a post or reply. Indexers should keep the latest vote per (author, subject).",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "direction": {
            "knownValues": [
              "up",
              "down"
            ],
            "type": "string"
          },
          "subject": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          }
        },
        "required": [
          "subject",
          "direction",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "cc.coffeencode.forum.vote",
  "lexicon": 1
}
```
