pics.2bit.challenge.entry

One of the author's own photos entered into a challenge for one of its prompts. One entry per person per prompt is enforced by this app's AppView rather than the record key: its write path deletes an author's earlier entry for a prompt before writing the new one, and where another client leaves several, the newest counts.

Repository @2bit.pics did:plc:sbmntiflmknij2axeck3w6u7 namespace authority
Details · record, key tid
Kindrecord
Record keytid
Authoritychallenge.2bit.pics
Indexed
cid bafyreian2dq3fc5w742nvx22uqnl6pepg4gzss36nhzygqeifft3j3wz2a

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One of the author's own photos entered into a challenge for one of its prompts. One entry per person per prompt is enforced by this app's AppView rather than the record key: its write path deletes an author's earlier entry for a prompt before writing the new one, and where another client leaves several, the newest counts.",
      "key": "tid",
      "record": {
        "properties": {
          "challenge": {
            "description": "Strong ref to the pics.2bit.challenge.list being entered. The AppView matches entries to their challenge by uri alone, so an organizer's later edit to the list (a fixed typo, a new prompt) doesn't detach the entries already made; the cid only records which version of the list the entry was made against.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "prompt": {
            "description": "Which prompt this entry answers, given as that prompt's `key` - one of the challenge list's `prompts[].key` values (pics.2bit.challenge.list#prompt), e.g. `6` - never its title, so the organizer can reword a title without detaching entries. An entry whose key the list doesn't have is skipped.",
            "maxLength": 32,
            "minLength": 1,
            "type": "string"
          },
          "subject": {
            "description": "Strong ref to the photo being entered: a pics.2bit.feed.photo in the same repo as this entry. A strongRef carries no type, so both are enforced by the AppView, which skips an entry for anyone else's photo. A photo that is later deleted or can't be shown leaves its prompt empty.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          }
        },
        "required": [
          "subject",
          "challenge",
          "prompt",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "pics.2bit.challenge.entry",
  "lexicon": 1
}