Files
digest_app/module_notification/models.py

16 lines
471 B
Python
Raw Normal View History

2024-02-26 13:28:32 +05:30
from django.db import models
from module_iam.models import BaseModel
2024-02-26 13:28:32 +05:30
# 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