# at.eptss.voteResult

> Published by [eptss.at](https://lexicon.garden/identity/did:plc:pf6izdjdonyd46isl3txwu4g)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pf6izdjdonyd46isl3txwu4g/at.eptss.voteResult)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pf6izdjdonyd46isl3txwu4g/at.eptss.voteResult/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pf6izdjdonyd46isl3txwu4g/at.eptss.voteResult/examples)

## Definitions

### `at.eptss.voteResult`

**Type**: `record`

Aggregate (anonymous) vote result for one candidate in one round, published by the organizer after voting closes. Individual scores are never published. The candidate is a strongRef to its at.eptss.track — one shape for a song across the whole system, not an embedded copy that goes stale. Integers only (count + total; clients divide) because DAG-CBOR forbids floats. The scale is self-describing: distribution has (scaleMax - scaleMin + 1) buckets, distribution[0] = count of scaleMin scores.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | Yes | Number of ballots that scored this candidate. |
| `round` | `ref` → `com.atproto.repo.strongRef` | Yes |  |
| `total` | `integer` | Yes | Sum of all scores for this candidate. Average = total / count. |
| `track` | `ref` → `com.atproto.repo.strongRef` | Yes | The at.eptss.track this result scores. |
| `ledger` | `ref` → `com.atproto.repo.strongRef` | Yes |  |
| `scaleMax` | `integer` | Yes |  |
| `scaleMin` | `integer` | Yes |  |
| `publishedAt` | `string` (datetime) | Yes |  |
| `distribution` | `array` | Yes |  |

## Raw Schema

```json
{
  "id": "at.eptss.voteResult",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "round",
          "ledger",
          "track",
          "count",
          "total",
          "scaleMin",
          "scaleMax",
          "distribution",
          "publishedAt"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of ballots that scored this candidate."
          },
          "round": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Sum of all scores for this candidate. Average = total / count."
          },
          "track": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "The at.eptss.track this result scores."
          },
          "ledger": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "scaleMax": {
            "type": "integer"
          },
          "scaleMin": {
            "type": "integer",
            "minimum": 0
          },
          "publishedAt": {
            "type": "string",
            "format": "datetime"
          },
          "distribution": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "minLength": 1
          }
        }
      },
      "description": "Aggregate (anonymous) vote result for one candidate in one round, published by the organizer after voting closes. Individual scores are never published. The candidate is a strongRef to its at.eptss.track — one shape for a song across the whole system, not an embedded copy that goes stale. Integers only (count + total; clients divide) because DAG-CBOR forbids floats. The scale is self-describing: distribution has (scaleMax - scaleMin + 1) buckets, distribution[0] = count of scaleMin scores."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
