51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
workspace Todo id "workspace:todo" revision "workspace:todo@1" commit "1111111111111111111111111111111111111111" {
|
|
atom Project id "atom:project" doc "A project containing work.";
|
|
atom Person id "atom:person";
|
|
|
|
import interface Named;
|
|
import interface Owned;
|
|
import interface Summary;
|
|
import package TodoRuntime;
|
|
|
|
shared state ProjectTitle id "slot:project:title" on Project : string
|
|
policy optimistic-register default "Untitled project";
|
|
|
|
conform Project as Named {
|
|
bind name.get to state ProjectTitle.read;
|
|
bind name.set to state ProjectTitle.write;
|
|
bind name.watch-start to state ProjectTitle.watch-start;
|
|
bind name.watch-stop to state ProjectTitle.watch-stop;
|
|
}
|
|
|
|
conform Person as Named {
|
|
private state PersonName id "slot:person:name" on Person : string
|
|
policy optimistic-register default "Anonymous";
|
|
bind name.get to state PersonName.read;
|
|
bind name.set to state PersonName.write;
|
|
bind name.watch-start to state PersonName.watch-start;
|
|
bind name.watch-stop to state PersonName.watch-stop;
|
|
}
|
|
|
|
conform Project as Owned {
|
|
private edge ProjectOwner id "edge:project:owner" {
|
|
atom Project projection owner id "projection:project-owner:owner" exactly-one;
|
|
interface Named projection ownedProjects id "projection:project-owner:owned-projects" many;
|
|
}
|
|
bind owner.resolve to edge ProjectOwner.owner.resolve;
|
|
bind owner.connect to edge ProjectOwner.owner.connect;
|
|
bind owner.disconnect to edge ProjectOwner.owner.disconnect;
|
|
bind owner.watch-start to edge ProjectOwner.owner.watch-start;
|
|
bind owner.watch-stop to edge ProjectOwner.owner.watch-stop;
|
|
}
|
|
|
|
conform Project as Summary {
|
|
bind summary.get to package TodoRuntime.summaryGet with {
|
|
title to state ProjectTitle;
|
|
named to interface Named;
|
|
person to constructor Person;
|
|
};
|
|
}
|
|
|
|
constructor Person to TodoRuntime.createPerson;
|
|
}
|