import device in notification structure

This commit is contained in:
2025-10-07 09:37:40 +03:30
parent 7f9001069b
commit f93e48c495
5 changed files with 54 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
from apps.core.models import BaseModel
from apps.authentication.models import Organization
from apps.pos_device.models import Device
from django.db import models
@@ -10,7 +11,12 @@ class Notification(BaseModel):
('transaction', 'Transaction'),
('system', 'System'),
)
device = models.ForeignKey(
Device,
on_delete=models.CASCADE,
related_name='notifications',
null=True
)
organization = models.ForeignKey(
Organization,
on_delete=models.CASCADE,