                         :issuer_verified (s/enum 0 1)
                         :show_evidence   (s/enum 0 1)
                         :last_checked (s/maybe s/Int)
-                        :old_id (s/maybe s/Int)})
+                        :old_id (s/maybe s/Int)
+                        :endorsement (s/maybe UserEndorsement)})
 
 
 (def valid-badge (s/validator UserBadge))

                                   http/json-get
                                   (get-endorsement (dec depth))))
                     (assoc-in e [:issuer :endorsement] [])))))))))

(defn- get-alignment [badge]
  (map (fn [a]

                       :audience (s/maybe s/Str)
                       :ctime s/Int
                       :mtime s/Int})

(s/defschema UserEndorsement [{:id (s/maybe s/Int)
                            :issuer_id (s/maybe s/Int)
                            :issuer_name (s/maybe s/Str)
                            :issuer_url (s/maybe s/Str)
                            :user_badge_id (s/maybe s/Int)
                            :external_id (s/maybe s/Str)
                            :content s/Str
                            :mtime s/Int
                            :ctime s/Int
                            }])


(s/defschema UserBadge {:id (s/maybe s/Int)
