package eu.ist.fears.server.domain; enum eu.ist.fears.common.State as State; /** * Entities */ class FearsApp; class Project { String name; String description; int featuresIncrementID; int initialVotes; int listPosition; } class User { String username; } class Voter { int votesUsed; } class FeatureRequest { String name; String description; State state; int webID; DateTime createdTime; DateTime lastModification; } class Comment { String comment; State newState; State oldState; DateTime createdTime; } /** * Relationships */ relation FearsAppHasProjects { FearsApp playsRole fearsApp; Project playsRole project { multiplicity *; } } relation FearsAppHasUsers { FearsApp playsRole fearsApp{ multiplicity 1..1; } User playsRole user { multiplicity *; } } relation UserHasVoters { User playsRole user{ multiplicity 1..1; } Voter playsRole voter { multiplicity *; } } relation FearsAppHasAdmin { FearsApp playsRole fears{ multiplicity 0..1; } User playsRole admin { multiplicity *; } } relation ProjectHasAdmin { Project playsRole project{ multiplicity 0..1; } User playsRole admin { multiplicity *; } } relation ProjectHasVoters { Project playsRole project{ multiplicity 1..1; } Voter playsRole voter { multiplicity *; } } relation ProjectAuthor { Project playsRole projectAuthored { multiplicity *; } User playsRole author { multiplicity 1..1; } } relation ProjectFeatureRequests { Project playsRole project; FeatureRequest playsRole featureRequest { multiplicity *; } } relation FeatureRequestComments { FeatureRequest playsRole featureRequest; Comment playsRole comment { multiplicity *; } } relation FeatureRequestVoters { FeatureRequest playsRole featuresVoted { multiplicity *; } Voter playsRole voter { multiplicity *; } } relation FeatureRequestAuthor { FeatureRequest playsRole featuresCreated { multiplicity *; } Voter playsRole author { multiplicity 1..1; } } relation CommentAuthor { Comment playsRole comment { multiplicity *; } Voter playsRole author { multiplicity 1..1; } }