gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
This commit is contained in:
25
core/apps/eggs/models/notification.py
Normal file
25
core/apps/eggs/models/notification.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from django.db import models
|
||||
|
||||
from core.http.models import AbstractBaseModel
|
||||
|
||||
|
||||
class Notification(AbstractBaseModel):
|
||||
title = models.CharField(max_length=255, verbose_name="Title")
|
||||
body = models.TextField(verbose_name="Body")
|
||||
user = models.ForeignKey(
|
||||
"http.User",
|
||||
on_delete=models.CASCADE,
|
||||
related_name="notifications",
|
||||
verbose_name="User",
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
is_read = models.BooleanField(default=False, verbose_name="Is read")
|
||||
is_sending = models.BooleanField(default=False, verbose_name="Is sending")
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.title
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Notification"
|
||||
verbose_name_plural = "Notifications"
|
||||
Reference in New Issue
Block a user