Add priority to notification rules
This commit is contained in:
@@ -15,6 +15,14 @@ except ImportError:
|
||||
from yaml import Loader
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
PRIORITY_CHOICES = (
|
||||
(1, "min"),
|
||||
(2, "low"),
|
||||
(3, "default"),
|
||||
(4, "high"),
|
||||
(5, "max"),
|
||||
)
|
||||
|
||||
|
||||
class Plan(models.Model):
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
@@ -137,6 +145,7 @@ class Perms(models.Model):
|
||||
class NotificationRule(models.Model):
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
name = models.CharField(max_length=255)
|
||||
priority = models.IntegerField(choices=PRIORITY_CHOICES, default=1)
|
||||
enabled = models.BooleanField(default=True)
|
||||
data = models.TextField()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user