Created
April 30, 2016 18:58
-
-
Save claj/4e36e7e45bba231e80f86cd6da3004cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:db/id #db/id [db.part/user 100001] | |
:question "what is your favourite animal?" | |
:question-type :single-option ;; could actually can be deduced from the fact below | |
:single-options ;; components or something. | |
[{:answer "cat" | |
:db/id #db/id [db.part/user 100002]} | |
{:answer "dog" | |
:db/id #db/id [db.part/user 100003]} | |
{:answer "rhino" | |
:db/id #db/id [db.part/user 100004]}]} | |
{:db/id #db/id [db.part/user 100005] | |
:question "what is your name?" | |
:question-type :text} | |
;; if needed, add forms with refs to the questions that was presented to the user | |
{:db/id #db/id [db.part/user 100006] | |
:username "some user" | |
:posted-forms [{:created (d/tempid :db.part/tx) ;; link to the transaction in which the form was created... | |
:answers [{:question #db/id [db.part/user 100001] | |
:single-option-answer :db/id #db/id [db.part/user 100004]} ;;link to component above | |
{:question #db/id [db.part/user 100005] | |
:text-answer "Neo Anderson"}]}]} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment