{
  "lexicon": 1,
  "id": "net.bisks.elopt.vote",
  "defs": {
    "main": {
      "type": "record",
      "description": "One visitor's call on who won a real bsky thread exchange between two accounts that have both opted in (net.bisks.elopt.optin). rkey is deterministic from the two subjects (order-independent) and the thread, so re-voting the same matchup in the same thread overwrites in place rather than stuffing extra votes. Written and read by elopt (https://elopt.bisks.net).",
      "key": "any",
      "record": {
        "type": "object",
        "required": ["subjectA", "subjectB", "winner", "thread", "createdAt"],
        "properties": {
          "subjectA": {
            "type": "string",
            "format": "did",
            "description": "DID of one of the two accounts battling. Order carries no meaning — see winner."
          },
          "subjectB": {
            "type": "string",
            "format": "did",
            "description": "DID of the other account battling."
          },
          "winner": {
            "type": "string",
            "format": "did",
            "description": "The voter's pick for who won this exchange — must equal subjectA or subjectB. A vote is only ever cast for a winner; there is no draw record."
          },
          "thread": {
            "type": "string",
            "format": "uri",
            "description": "at:// URI of the thread root this vote is about — the real exchange the voter watched to make this call."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this vote was last written, as an ISO 8601 datetime."
          }
        }
      }
    }
  }
}
