{
  "lexicon": 1,
  "id": "net.bisks.socialcredit.vote",
  "defs": {
    "main": {
      "type": "record",
      "description": "A single +1 or -1 cast by one Bluesky account against another. One record per vote, never overwritten — the running score and the one-vote-per-hour cooldown are tallied by clients watching Jetstream for this collection, not stored in the record itself. Written and read by socialcredit (https://socialcredit.bisks.net).",
      "key": "tid",
      "record": {
        "type": "object",
        "required": ["target", "delta", "createdAt"],
        "properties": {
          "target": {
            "type": "string",
            "format": "did",
            "description": "DID of the account being voted on."
          },
          "delta": {
            "type": "integer",
            "minimum": -1,
            "maximum": 1,
            "description": "The vote's direction: always exactly 1 (upvote, the '+1' button) or -1 (downvote, the '-1' button) in the current client — there is no way to cast a larger swing in one vote."
          },
          "reason": {
            "type": "string",
            "maxLength": 1120,
            "maxGraphemes": 280,
            "description": "Optional free-text reason for the vote, trimmed client-side to 280 characters before writing."
          },
          "postUrl": {
            "type": "string",
            "maxLength": 300,
            "description": "Optional link to a bsky.app post giving context for the vote. The client only writes this field when the value matches https://bsky.app/profile/<handle-or-did>/post/<rkey> — anything else is silently dropped before the write."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the vote was cast, as an ISO 8601 datetime."
          }
        }
      }
    }
  }
}
