32 lines
1.3 KiB
Python
32 lines
1.3 KiB
Python
# Generated by Django 5.2.3 on 2025-11-18 12:06
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('notifications', '0002_notification'),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='notification',
|
|
name='is_general',
|
|
field=models.BooleanField(default=False, help_text='If True, this notification is visible to all users (system-wide announcement)', verbose_name='Is General'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='notification',
|
|
name='target_roles',
|
|
field=models.JSONField(blank=True, default=list, help_text="List of user roles that should see this notification (e.g., ['ADMIN', 'FRONT_DESK'])", verbose_name='Target Roles'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='notification',
|
|
name='user',
|
|
field=models.ForeignKey(blank=True, help_text='Specific user for personal notifications. Leave empty for general/role-based notifications.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to=settings.AUTH_USER_MODEL, verbose_name='User'),
|
|
),
|
|
]
|