# Generated by Django 5.2.1 on 2025-05-15 20:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True, editable=False)),
                ('is_deleted', models.BooleanField(default=False, editable=False)),
                ('created_datetime', models.DateTimeField(default=django.utils.timezone.localtime, editable=False)),
                ('type', models.CharField(choices=[('app', 'App'), ('email', 'Email'), ('push', 'Push'), ('sms', 'Sms')], default='email', max_length=32)),
                ('title', models.CharField(max_length=124)),
                ('body', models.TextField(default='')),
                ('url', models.CharField(default='', max_length=255)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('processing', 'Processing'), ('sent', 'Sent'), ('errored', 'Errored'), ('failed', 'Failed')], default='pending', max_length=32)),
                ('status_message', models.TextField(default='')),
                ('priority', models.CharField(choices=[('low', 'Low'), ('medium', 'Medium'), ('high', 'High')], default='low', max_length=32)),
                ('publish_datetime', models.DateTimeField(default=django.utils.timezone.now)),
                ('sent_datetime', models.DateTimeField(blank=True, null=True)),
                ('object_id', models.PositiveIntegerField(blank=True, null=True)),
                ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='django_spire_notifications', to='contenttypes.contenttype')),
                ('user', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='notifications', related_query_name='notification', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Notification',
                'verbose_name_plural': 'Notifications',
                'db_table': 'django_spire_notification',
            },
        ),
    ]
