added claim model
authorNishanth Amuluru <nishanth@fossee.in>
Sat, 08 Jan 2011 20:58:17 +0530
changeset 323 4ca185390379
parent 322 2120e853f10b
child 324 2f20098f2da3
added claim model
pytask/taskapp/models.py
--- a/pytask/taskapp/models.py	Sat Jan 08 20:55:34 2011 +0530
+++ b/pytask/taskapp/models.py	Sat Jan 08 20:58:17 2011 +0530
@@ -42,11 +42,26 @@
     task = models.ForeignKey('Task', related_name = "%(class)s_task")
             
     data = models.TextField()
-    created_by = models.ForeignKey(User, related_name = "%(class)s_created_by")
+    commented_by = models.ForeignKey(User, related_name = "%(class)s_created_by")
     deleted_by = models.ForeignKey(User, null = True, blank = True,
                                    related_name = "%(class)s_deleted_by")
-    creation_datetime = models.DateTimeField()
+    comment_datetime = models.DateTimeField()
     is_deleted = models.BooleanField(default=False)
 
     def __unicode__(self):
         return unicode(self.task.title)
+
+class TaskClaim(models.Model):
+
+    uniq_key = models.CharField(max_length = 10, unique = True)
+    task = models.ForeignKey('Task', related_name = "%(class)s_task")
+            
+    claimed_by = models.ForeignKey(User, related_name = "%(class)s_created_by")
+    proposal = models.TextField()
+
+    comment_datetime = models.DateTimeField()
+    is_deleted = models.BooleanField(default=False)
+
+    def __unicode__(self):
+        return unicode(self.task.title)
+