diff --git a/hr/app_defines.py b/hr/app_defines.py index 5a4288b..186bb38 100644 --- a/hr/app_defines.py +++ b/hr/app_defines.py @@ -51,3 +51,11 @@ BLACKLIST_TYPE_CHOICES = ( (BLACKLIST_TYPE_EMAIL, 'Email Address'), (BLACKLIST_TYPE_AUTH, 'Auth Account'), ) + +BLACKLIST_SOURCE_INTERNAL = 0 +BLACKLIST_SOURCE_EXTERNAL = 1 + +BLACKLIST_SOURCE_CHOICES = ( + (BLACKLIST_SOURCE_INTERNAL, 'Internal'), + (BLACKLIST_SOURCE_EXTERNAL, 'External'), +) diff --git a/hr/models.py b/hr/models.py index 89ed562..2f59547 100644 --- a/hr/models.py +++ b/hr/models.py @@ -131,6 +131,11 @@ class Blacklist(models.Model): expiry_date = models.DateTimeField(verbose_name="Expiry Date", blank=False, null=True, help_text="Date to expire this entry") + source = models.IntegerField(choices=BLACKLIST_SOURCE_CHOICES, + verbose_name="Blacklist Source", + help_text="Source of the blacklisted item", + default=BLACKLIST_SOURCE_INTERNAL) + created_date = models.DateTimeField(auto_now_add=True, verbose_name="Created Date") created_by = models.ForeignKey(User, blank=False, verbose_name="Created By")