feat: added group_by_id field in notifications model (#35137)
This commit is contained in:
committed by
GitHub
parent
7ae80be815
commit
e12ec1b153
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-23 07:59
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('notifications', '0005_notification_email_notification_web'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='notification',
|
||||
name='group_by_id',
|
||||
field=models.CharField(db_index=True, default='', max_length=42),
|
||||
),
|
||||
]
|
||||
@@ -109,6 +109,7 @@ class Notification(TimeStampedModel):
|
||||
email = models.BooleanField(default=False, null=False, blank=False)
|
||||
last_read = models.DateTimeField(null=True, blank=True)
|
||||
last_seen = models.DateTimeField(null=True, blank=True)
|
||||
group_by_id = models.CharField(max_length=42, db_index=True, null=False, default="")
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.user.username} - {self.course_id} - {self.app_name} - {self.notification_type}'
|
||||
|
||||
Reference in New Issue
Block a user