# Generated by Django 4.0.3 on 2022-11-05 21:58

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='OutgoingMessage',
            fields=[
                ('key', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('type', models.TextField(choices=[('user_start', 'user_start'), ('quick_reply', 'quick_reply'), ('call_to_action', 'call_to_action'), ('text', 'text'), ('media', 'media'), ('number', 'number'), ('choices', 'choices'), ('generic', 'generic')], default='text')),
                ('template_name', models.TextField(default=None, null=True)),
                ('message_variables', models.JSONField(default=None, null=True)),
                ('quick_reply', models.JSONField(default=None, null=True)),
                ('choices', models.JSONField(default=None, null=True)),
                ('text', models.CharField(db_index=True, max_length=500, null=True)),
                ('variable', models.CharField(max_length=250, null=True)),
                ('actions', models.JSONField(default=None, null=True)),
                ('skip_if_exists', models.JSONField(default=None, null=True)),
                ('next_message', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='whatsapp_business_api_is.outgoingmessage')),
            ],
        ),
        migrations.CreateModel(
            name='WaUser',
            fields=[
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.TextField(blank=True)),
                ('number', models.CharField(max_length=13, primary_key=True, serialize=False)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('opt_in', models.BooleanField(default=False)),
                ('state', models.ForeignKey(default='initial', on_delete=django.db.models.deletion.CASCADE, to='whatsapp_business_api_is.outgoingmessage')),
            ],
        ),
        migrations.CreateModel(
            name='IncomingMessage',
            fields=[
                ('key', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('type', models.TextField(choices=[('user_start', 'user_start'), ('quick_reply', 'quick_reply'), ('call_to_action', 'call_to_action'), ('text', 'text'), ('media', 'media'), ('number', 'number'), ('choices', 'choices'), ('generic', 'generic')], default='user_start')),
                ('pattern', models.CharField(db_index=True, max_length=250, null=True)),
                ('actions', models.JSONField(default=None, null=True)),
                ('force_next', models.BooleanField(default=False)),
                ('is_default', models.BooleanField(default=False)),
                ('validators', models.JSONField(default=None, null=True)),
                ('message', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='responses', to='whatsapp_business_api_is.outgoingmessage')),
                ('reply', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='whatsapp_business_api_is.outgoingmessage')),
            ],
        ),
    ]
