{
  "lexicon": 1,
  "id": "net.bisks.rateyourbuild.vote",
  "defs": {
    "main": {
      "type": "record",
      "description": "An upvote or downvote on someone else's net.bisks.rateyourbuild.rating review. One record per (voter, reviewed site, review author) — re-voting overwrites in place; deleting the record removes the vote. Written and read by rateyourbuild (https://rateyourbuild.bisks.net).",
      "key": "any",
      "record": {
        "type": "object",
        "required": ["subject", "reviewer", "value", "votedAt"],
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 200,
            "maxGraphemes": 100,
            "description": "The bare name of the rated site — same value as the rating record's subject."
          },
          "reviewer": {
            "type": "string",
            "format": "did",
            "description": "DID of the account whose rating/review this vote is on."
          },
          "value": {
            "type": "integer",
            "enum": [-1, 1],
            "description": "1 for an upvote, -1 for a downvote."
          },
          "votedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this vote was last written, as an ISO 8601 datetime."
          }
        }
      }
    }
  }
}
