Files
eggs-backend/core/apps/eggs/models/notification.py
husanjon ab73d05ecc
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
gold eggs backend
2026-04-15 08:59:36 +02:00

26 lines
741 B
Python

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"