diff --git a/apps/notification/__init__.py b/apps/notification/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/api/__init__.py b/apps/notification/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/api/v1/__init__.py b/apps/notification/api/v1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/api/v2/__init__.py b/apps/notification/api/v2/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/api/v2/serializers.py b/apps/notification/api/v2/serializers.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/api/v2/urls.py b/apps/notification/api/v2/urls.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/api/v2/views.py b/apps/notification/api/v2/views.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/apps.py b/apps/notification/apps.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/fixtures/.gitkeep b/apps/notification/fixtures/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/management/__init__.py b/apps/notification/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/management/commands/__init__.py b/apps/notification/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/management/commands/command.py b/apps/notification/management/commands/command.py new file mode 100644 index 0000000..c68face --- /dev/null +++ b/apps/notification/management/commands/command.py @@ -0,0 +1 @@ +# Your custom management commands go here. diff --git a/apps/notification/migrations/__init__.py b/apps/notification/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/mobile/api/__init__.py b/apps/notification/mobile/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/mobile/api/v1/__init__.py b/apps/notification/mobile/api/v1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/mobile/api/v1/api.py b/apps/notification/mobile/api/v1/api.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/mobile/api/v1/serializers.py b/apps/notification/mobile/api/v1/serializers.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/mobile/api/v1/urls.py b/apps/notification/mobile/api/v1/urls.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/mobile/api/v1/views.py b/apps/notification/mobile/api/v1/views.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/models.py b/apps/notification/models.py new file mode 100644 index 0000000..5ae1ada --- /dev/null +++ b/apps/notification/models.py @@ -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) diff --git a/apps/notification/pos/__init__.py b/apps/notification/pos/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/pos/api/__init__.py b/apps/notification/pos/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/pos/api/v1/__init__.py b/apps/notification/pos/api/v1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/pos/api/v1/api.py b/apps/notification/pos/api/v1/api.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/pos/api/v1/serializers.py b/apps/notification/pos/api/v1/serializers.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/pos/api/v1/urls.py b/apps/notification/pos/api/v1/urls.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/pos/api/v1/views.py b/apps/notification/pos/api/v1/views.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/services.py b/apps/notification/services.py new file mode 100644 index 0000000..93888af --- /dev/null +++ b/apps/notification/services.py @@ -0,0 +1 @@ +# Your services go here diff --git a/apps/notification/tests/test_common_services.py b/apps/notification/tests/test_common_services.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/urls.py b/apps/notification/urls.py new file mode 100644 index 0000000..0865d84 --- /dev/null +++ b/apps/notification/urls.py @@ -0,0 +1 @@ +# Your urls go here diff --git a/apps/notification/web/api/__init__.py b/apps/notification/web/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/web/api/v1/__init__.py b/apps/notification/web/api/v1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/web/api/v1/api.py b/apps/notification/web/api/v1/api.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/web/api/v1/serializers.py b/apps/notification/web/api/v1/serializers.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/web/api/v1/urls.py b/apps/notification/web/api/v1/urls.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/notification/web/api/v1/views.py b/apps/notification/web/api/v1/views.py new file mode 100644 index 0000000..e69de29