               :db.type/long
               :db/index true
               :db/doc "db/id of the document")
+
+   ;; TODO: switch document-ref to document
+   (attribute :access-request/document-ref
+              :db.type/ref
+              :db/doc "document that this request belongs to")
+
    (attribute :access-request/status
               :db.type/ref)
    ;; no granted status, b/c those are just permissions

              :db.type/long
              :db/doc "db/id of this layer's parent. Could be called \"parent\", but want to avoid confusion with \"child\", which is taken.")

   ;; No logins at the moment, so we'll use this to identify users
   ;; chats rely on this, is it a good idea? Nice to have something stable across tabs
   (attribute :session/uuid

   (enum :transaction.source/unmark-sent-email)
   (enum :transaction.source/mark-sent-email)
   (enum :transaction.source/migration)

   (attribute :transaction/document
              :db.type/ref
              :db/doc "Annotates transaction with document it belongs to")

   (attribute :migration
              :db.type/ref
