notification: add firebase notification to web
This commit is contained in:
@@ -3,7 +3,15 @@ from django.db import models
|
||||
from core.apps.shared.models import BaseModel
|
||||
from core.apps.accounts.models import User
|
||||
|
||||
|
||||
class Notification(BaseModel):
|
||||
type = models.CharField(
|
||||
choices=[('web', 'web'), ('mobile', 'mobile')],
|
||||
max_length=6,
|
||||
default='mobile'
|
||||
)
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='notifications')
|
||||
token = models.CharField(max_length=255, unique=True)
|
||||
|
||||
|
||||
class Meta:
|
||||
unique_together = ('type', 'user', 'token')
|
||||
Reference in New Issue
Block a user