workouttest_backoffice/aitrainer_backoffice/aitrainer_backoffice/models/notification.py
Tibor Bossanyi (Freelancer) 696ce5a368 V1.30 notification
2021-10-01 15:53:20 +02:00

22 lines
1017 B
Python

from django.db import models
from django.utils.translation import ugettext_lazy as _
class Notification(models.Model):
notification_id = models.AutoField(primary_key=True)
message_title = models.CharField(max_length=50)
message_body = models.TextField(max_length=100, blank=True, null=True)
image_url = models.ImageField(upload_to='images/', help_text='The notification image')
schedule_date = models.DateField(blank=True, null=True)
schedule_hook = models.TextField(max_length=100, blank=True, null=True)
schedule_sql = models.TextField(max_length=1000, blank=True, null=True)
internal_name = models.CharField(max_length=50, blank=True, null=True)
internal_description = models.TextField(max_length=500, blank=True, null=True)
active = models.BooleanField(default=0)
class Meta:
db_table = 'notification'
verbose_name = _("Notification")
verbose_name_plural = _("Notifications")
def __str__(self):
return self.internal_name