Skip to content

Instantly share code, notes, and snippets.

@William-Michael-Russell
Last active May 31, 2018 20:09
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 William-Michael-Russell/5b159ad1f758cceeeb8cfe38eead5952 to your computer and use it in GitHub Desktop.
Save William-Michael-Russell/5b159ad1f758cceeeb8cfe38eead5952 to your computer and use it in GitHub Desktop.
Organizing
/*
The Harness houses the Fuu and Foo components.
4 Foos can exist within 1 Harness
32 Fuus can exist within 1 Harness
Bars organize the Fuu's and Foo's within the Harness.
4 Bars can exist within a Harness.
The API should be able to determine how many components a harness has assigned to it.
Harness:
1. Fuu1
2. Fuu2
3. Fuu3
4. Fuu4
...
1. Foo1
2. Foo2
3. Foo3
4. Foo4
1. Bar1
2. Bar2
...
The Bar organizes the Components
Harness:
Bar1:
Fuu1
Fuu2
Foo1
Bar2:
Fuu3
Fuu4
Foo2
...
*/
/*
The Harness can contain multiple Foo's and Fuu's and Bar's
*/
entity Harness {
harnessName String required
}
/*
The Bar can contain multiple Fuu's, but only one Foo
*/
entity Bar {
barName String required
}
/*
4 Foo's can exist within 1 Harness, but only 1 assigned to a Bar.
*/
entity Foo {
fooName String required minlength(1)
}
/*
32 Fuus can exist withiun 1 harness, and multiple can be assigned to a Bar
*/
entity Fuu {
fuuName String required minlength(1)
}
relationship OneToMany {
Harness{bar} to Bar{harness}
Harness{fuu} to Fuu{harness}
Harness{foo} to Foo{harness}
Bar{fuu} to Fuu{bar}
}
relationship OneToOne {
Bar{foo} to Foo{bar}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment