Files
2025-05-23 14:44:12 +08:00

50 lines
2.2 KiB
Python

# Generated by Django 3.2 on 2022-11-02 06:34
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('roles', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Notification',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.CharField(blank=True, max_length=255, null=True)),
('updated_by', models.CharField(blank=True, max_length=255, null=True)),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('instance_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('notification_title', models.CharField(blank=True, max_length=255, null=True)),
('notification_text', models.CharField(blank=True, max_length=255, null=True)),
('icon', models.CharField(blank=True, max_length=225, null=True)),
('is_view', models.BooleanField(default=False)),
('is_superuser', models.BooleanField(default=False)),
('role', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='roles.role')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='UserNotification',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_seen', models.BooleanField(default=False)),
('notification', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='notifications.notification')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
],
),
]