# Generated by Django 5.2.6 on 2025-09-15 10:41

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='EmailRecipient',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('by_docfield', models.CharField(blank=True, max_length=255, null=True, verbose_name='By Document Field')),
                ('by_email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='By Email')),
                ('created', models.DateTimeField(blank=True, null=True, verbose_name='Created')),
                ('updated', models.DateTimeField(blank=True, null=True, verbose_name='Last Updated')),
            ],
            options={
                'verbose_name': 'Email Recipient',
                'verbose_name_plural': 'Email Recipients',
            },
        ),
        migrations.CreateModel(
            name='NumberRecipient',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('by_docfield', models.CharField(blank=True, max_length=255, null=True, verbose_name='By Document Field')),
                ('by_number', models.CharField(blank=True, max_length=255, null=True, verbose_name='By Number')),
                ('created', models.DateTimeField(blank=True, null=True, verbose_name='Created')),
                ('updated', models.DateTimeField(blank=True, null=True, verbose_name='Last Updated')),
            ],
            options={
                'verbose_name': 'Number Recipient',
                'verbose_name_plural': 'Number Recipients',
            },
        ),
        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, verbose_name='Is Active')),
                ('channel', models.CharField(choices=[('E', 'Email'), ('S', 'SMS'), ('W', 'Whatsapp')], default='E', max_length=1, verbose_name='Channel')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('message', models.TextField(verbose_name='Message')),
                ('model', models.CharField(max_length=255, verbose_name='Model')),
                ('send_alert_on', models.CharField(choices=[('N', 'New'), ('U', 'Update'), ('V', 'Value Change'), ('D', 'Delete'), ('B', 'Days Before'), ('A', 'Days After')], default='N', max_length=1, verbose_name='Send Alert On')),
                ('value_change_field', models.CharField(blank=True, max_length=255, null=True, verbose_name='Value Change Field')),
                ('date_field', models.CharField(blank=True, max_length=255, null=True, verbose_name='Day Field')),
                ('alert_days', models.IntegerField(blank=True, null=True, verbose_name='Alert Days')),
                ('conditions', models.TextField(blank=True, null=True, verbose_name='Conditions')),
                ('created', models.DateTimeField(blank=True, null=True, verbose_name='Created')),
                ('updated', models.DateTimeField(blank=True, null=True, verbose_name='Last Updated')),
                ('email_recipients', models.ManyToManyField(blank=True, to='silque_notifications.emailrecipient', verbose_name='Email Recipients')),
                ('number_recipients', models.ManyToManyField(blank=True, to='silque_notifications.numberrecipient', verbose_name='Number Recipients')),
            ],
            options={
                'verbose_name': 'Notification',
                'verbose_name_plural': 'Notifications',
            },
        ),
    ]
