{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A post in a book club discussion, stored in the author's repo inside the club's space. Threading follows the aggregator-forum shape: every post carries a root (the bookClub.thread) and a parent; a top-level post is its own parent (parent == root), while a reply's parent is another post in the same thread. Linear readers can ignore parent beyond the root; tree readers can rebuild the tree. The space, not the record, is the access boundary.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "description": "Client-declared timestamp when the post was created.",
            "format": "datetime",
            "type": "string"
          },
          "langs": {
            "description": "Human language of the text, BCP 47 tags.",
            "items": {
              "format": "language",
              "type": "string"
            },
            "maxLength": 3,
            "type": "array"
          },
          "reply": {
            "ref": "#replyRef",
            "type": "ref"
          },
          "text": {
            "description": "The post body. Empty is allowed when the post is only a reply marker, though a discussion post normally has text.",
            "maxGraphemes": 2000,
            "maxLength": 10000,
            "type": "string"
          }
        },
        "required": [
          "text",
          "reply",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "replyRef": {
      "description": "Thread position. `root` MUST be a net.olamaelcu.livtet.bookClub.thread record in the same space. `parent` MUST be that thread (for a top-level post, where parent == root) or another net.olamaelcu.livtet.bookClub.post in the same space whose own root matches. StrongRefs pin the revision being answered, as app.bsky.feed.post does; grouping compares `root.uri`, so an edited thread keeps one discussion.",
      "properties": {
        "parent": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "root": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "root",
        "parent"
      ],
      "type": "object"
    }
  },
  "id": "net.olamaelcu.livtet.bookClub.post",
  "lexicon": 1
}
