first structure & deployment of notification

This commit is contained in:
2025-09-29 15:55:11 +03:30
parent 174dfff0c5
commit c046c60f4a
36 changed files with 38 additions and 0 deletions

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -0,0 +1 @@
# Your custom management commands go here.

View File

View File

View File

View File

View File

View File

@@ -0,0 +1,35 @@
from apps.core.models import BaseModel
from apps.authentication.models import Organization
from django.db import models
class Notification(BaseModel):
NOTIFICATION_TYPES = (
('quota', 'Quota'),
('inventory', 'Inventory'),
('transaction', 'Transaction'),
('system', 'System'),
)
organization = models.ForeignKey(
Organization,
on_delete=models.CASCADE,
related_name='notifications',
null=True
)
title = models.CharField(max_length=255, null=True)
message = models.TextField(null=True, blank=True)
type = models.CharField(
max_length=50,
choices=NOTIFICATION_TYPES,
default='system'
)
is_read = models.BooleanField(default=False)
delivered = models.BooleanField(default=False)
def __str__(self):
return f'{self.organization.name} - {self.title}'
def save(self, *args, **kwargs):
return super(Notification, self).save(*args, **kwargs)

View File

View File

View File

View File

View File

View File

View File

@@ -0,0 +1 @@
# Your services go here

View File

@@ -0,0 +1 @@
# Your urls go here

View File

View File

View File

View File

View File