Commit 3eb587e57c8560f40c390b7be4df71c372e404d5

Authored by fbormann
1 parent 3ea9a771

improved documentations on classes #41

Showing 1 changed file with 14 additions and 0 deletions   Show diff stats
core/models.py
@@ -24,6 +24,10 @@ class Resource(models.Model): @@ -24,6 +24,10 @@ class Resource(models.Model):
24 """ 24 """
25 It represents the resource where the action was applied on. 25 It represents the resource where the action was applied on.
26 Example: Pool was answered (Resource: Pool), PDF was visualized(Resource: PDF). 26 Example: Pool was answered (Resource: Pool), PDF was visualized(Resource: PDF).
  27 +
  28 + Attributes:
  29 + @name: name of the resource affected
  30 + @created_date: The date the resource was created
27 """ 31 """
28 32
29 name = models.CharField(_('Name'), max_length =100) 33 name = models.CharField(_('Name'), max_length =100)
@@ -51,6 +55,16 @@ class Action_Resource(models.Model): @@ -51,6 +55,16 @@ class Action_Resource(models.Model):
51 55
52 56
53 class Notification(models.Model): 57 class Notification(models.Model):
  58 + """
  59 + Attributes:
  60 + @message: The message that will be shown on the notification prompt
  61 + @user: The User that the notification will be sent to.
  62 + @read: Whether or not the user has read the notification.
  63 + @datetime: The time the notification was created
  64 + @action_resource: The Object that holds the information about which action was perfomed on the Resource
  65 + @actor: The user who applied the action
  66 + """
  67 +
54 message = models.TextField(_('Message')) 68 message = models.TextField(_('Message'))
55 user = models.ForeignKey(User, related_name = _('%(class)s_Actor'), verbose_name= _('User')) 69 user = models.ForeignKey(User, related_name = _('%(class)s_Actor'), verbose_name= _('User'))
56 read = models.BooleanField(_('Read'), default = False) 70 read = models.BooleanField(_('Read'), default = False)