               :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

   (attribute :access-grant/granter
              :db.type/long ;; TODO: make this a ref!
              :db/doc "user that granted the permission")

   (attribute :access-grant/grant-date
              :db.type/instant

              :db.type/long ;; TODO: make this a ref!
              :db/doc "user that granted the permission")

   ;; TODO: switch granter to granter-ref
   (attribute :permission/granter-ref
              :db.type/ref ;; TODO: make this a ref!
              :db/doc "cust that granted the permission")

   (attribute :permission/grant-date
              :db.type/instant
              :db/doc "time permission was created (or access-grant if it came first)")
