Comment posting support.
[zzz-floof.git] / floof / model / comments.py
index f46b37d..4504b6f 100644 (file)
@@ -1,3 +1,5 @@
+import datetime
+
 from elixir import *
 
 class Discussion(Entity):
@@ -6,6 +8,8 @@ class Discussion(Entity):
     comments = OneToMany('Comment')
 
 class Comment(Entity):
-    discussion = ManyToOne('Discussion')
+    time = Field(DateTime, default=datetime.datetime.now)
     text = Field(Unicode(65536))
 
+    discussion = ManyToOne('Discussion')
+    user = ManyToOne('User')