Comment posting support.
[zzz-floof.git] / floof / model / comments.py
1 import datetime
2
3 from elixir import *
4
5 class Discussion(Entity):
6 """Represents a collection of comments attached to some other object."""
7 count = Field(Integer)
8 comments = OneToMany('Comment')
9
10 class Comment(Entity):
11 time = Field(DateTime, default=datetime.datetime.now)
12 text = Field(Unicode(65536))
13
14 discussion = ManyToOne('Discussion')
15 user = ManyToOne('User')