+
+ def __unicode__(self):
+ return self.text
+
+
+class Rating(Entity):
+ art = ManyToOne('Art', ondelete='cascade')
+ rater = ManyToOne('User', ondelete='cascade')
+ score = Field(Integer)
+
+ options = {-1:"sucks", 0:"undecided", 1:"good", 2:"great"}
+ default = 0
+
+Rating.reverse_options = dict (zip(Rating.options.values(), Rating.options.keys()))
+
+
+
+class UserRelation(Entity):
+ user = ManyToOne("User")
+ art = ManyToOne("Art")
+ kind = Field(String) # by for of
+ creator = ManyToOne("User")
+ confirmed_by_related_user = Field(Boolean)
+
+ # it is useful to record which authority figure on a given artwork
+ # confirmed the validity of this relation.
+ confirmed_by_authority = ManyToOne("User")