 
   (d/transact db-conn [[:db/add [:team/domain "abc"] :team/schedule "* * F * *"]])
 
+  (d/pull (d/db db-conn) [:team/domain :team/schedule] [:team/domain "abc"])
 
 
 

          (println "Users" users)
          (println "Questions" questions)))))

(defn schedule-questionnaire-job [scheduler domain cron-string]
  (let [job (jobs/build
             (jobs/of-type QuestionnaireJob)
             (jobs/using-job-data {:domain domain})
             (jobs/with-identity (jobs/key (str "jobs." domain))))
        trigger (triggers/build
                 (triggers/with-identity (triggers/key (str "triggers." domain)))


(defn submit-answers [db-conn domain user answers]
  ;; TODO insert into datomic db
  (let [db (d/db db-conn)
        user-eid (d/q '[:find ?member .
                        :in $ domain user
                        :where
                        [?team :team/domain domain]
                        [?team :team/members ?member]
                        [?member :member/name ?user]]
                      db domain user)
        tx (for [answer answers]
             {:db/id (d/tempid :db.part/user)
              :answer/author user-eid
              :answer/text (:answer answer)
              :answer/ts (:ts answer)
              :_question/answers (:question answer)})]
    @(d/transact db-conn tx)))

(defjob QuestionnaireJob [{:keys [domain db-conn]}]
  (let [db (d/db db-conn)
