Skip to content

Instantly share code, notes, and snippets.

@d4hines
Last active March 30, 2019 19:11
Show Gist options
  • Save d4hines/2703572e99fc5a44dcb18da23726d340 to your computer and use it in GitHub Desktop.
Save d4hines/2703572e99fc5a44dcb18da23726d340 to your computer and use it in GitHub Desktop.
Panel Schema
;; Panel attributes
;; Top, Left, Bottom, and Right
;; Each of these is a ref to an Edge.
{:db/ident :panel/top
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :panel/left
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :panel/bottom
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :panel/right
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
;; An Edge may either have an x or y coordinate.
{:db/ident :edge/x
:db/valueType :db.type/long
:db/cardinality :db.cardinality/one}
{:db/ident :panel/right
:db/valueType :db.type/long
:db/cardinality :db.cardinality/one}
{:db/ident :group/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}
;; A Panels and Groups may have a parent entity, which must be a Group.
{:db/ident :entity/parent
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment