# Generated by Django 2.2.17 on 2021-07-23 21:30

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import magic_notifier.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('type', models.CharField(max_length=30)),
                ('sub_type', models.CharField(blank=True, max_length=30, null=True)),
                ('link', models.CharField(max_length=255, verbose_name='The link associated')),
                ('image', models.ImageField(upload_to='notifications')),
                ('actions', magic_notifier.models.JSONField(default=dict)),
                ('data', magic_notifier.models.JSONField(default=dict)),
                ('read', models.DateTimeField(blank=True, null=True)),
                ('sent', models.DateTimeField(auto_now_add=True)),
                ('mode', models.CharField(choices=[('user', 'User'), ('admin', 'Admin')], default='user', max_length=10)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
