Files
digest_app/module_notification/models.py

18 lines
473 B
Python

from django.db import models
from module_iam.models import BaseModel
# Create your models here.
class PushNotification(BaseModel):
title = models.CharField(max_length=255)
banner_image = models.ImageField(upload_to='push_notification_images/', blank=True, null=True)
message = models.TextField()
timestamp = models.DateTimeField(auto_now_add=True)
class Meta:
db_table = "push_notification"
def __str__(self):
return self.title