network_inventory/backend/backups/models/notification.py

22 lines
506 B
Python
Raw Normal View History

2020-01-11 17:01:21 +01:00
from django.db import models
from core.models import Category
class NotificationType(Category):
pass
class Notification(models.Model):
name = models.CharField(max_length=50)
description = models.TextField(blank=True)
recipient = models.EmailField()
notification_type = models.ForeignKey(NotificationType, models.SET_NULL,
blank=True, null=True)
2020-07-07 22:12:57 +02:00
class Meta:
ordering = ['name']
2020-01-11 17:01:21 +01:00
def __str__(self):
return self.name