{
  "lexicon": 1,
  "id": "me.gdey.resolutionroulette.promotion",
  "defs": {
    "main": {
      "type": "record",
      "description": "Records the promotion of the winning resolution on the resolution date. Written before the app.bsky.feed.post so the promotion is durable regardless of whether the post succeeds. rkey is a TID assigned at write time.",
      "key": "tid",
      "record": {
        "type": "object",
        "required": ["entryRef", "promotedId", "promotedText", "promotedAt"],
        "properties": {
          "entryRef": {
            "type": "ref",
            "ref": "com.atproto.repo.strongRef",
            "description": "Strong reference to the parent entry record."
          },
          "promotedId": {
            "type": "integer",
            "description": "The id of the promoted resolution, as set in the entry's resolution list."
          },
          "promotedText": {
            "type": "string",
            "description": "Snapshot of the promoted resolution's text. Preserved here so the promotion record is self-contained if the entry is later modified.",
            "maxGraphemes": 1000,
            "maxLength": 10000
          },
          "promotedAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp when this promotion was recorded by the worker."
          },
          "postUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT URI of the app.bsky.feed.post written for this promotion. Absent until the post succeeds; patched into the record via putRecord after the post is confirmed."
          }
        }
      }
    }
  }
}
