Skip to content

Instantly share code, notes, and snippets.

@tbrooke
Created June 25, 2021 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbrooke/cd33779c1e3e21767dada4c00776ea85 to your computer and use it in GitHub Desktop.
Save tbrooke/cd33779c1e3e21767dada4c00776ea85 to your computer and use it in GitHub Desktop.
Contract Registry
(def registry
{:user/id :uuid
:user/email :string
:user [:map {:closed true}
[:crux.db/id :user/id]
:user/email
[:user/foo {:optional true}]
[:user/bar {:optional true}]]
:msg/id :uuid
:msg/user :user/id
:msg/text :string
:msg/sent-at inst?
:msg [:map {:closed true}
[:crux.db/id :msg/id]
:msg/user
:msg/text
:msg/sent-at]
:contract/contractID :uuid
:contract/template :string
:contract/text :string
:contract/model :string
:contract/logic :string
:contract/partyID :string
:contract/stateID :string
:contract [:map
[:crux.db/id :contract/contractID]
:contract/contractID
:contract/template
:contract/text
:contract/model
:contract/logic
:contract/partyID
:contract/stateID]
:clause/clauseID :uuid
:clause/template :string
:clause/text :string
:clause/model :string
:clause/logic :string
:clause/partyID :string
:clause/stateID :string
:clause [:map
:clause/clauseID
:clause/template
:clause/text
:clause/model
:clause/logic
:clause/partyID
:clause/stateID
[:crux.db/id :clause/clauseID]]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment