# Generated by Django 2.2.4 on 2020-02-12 07:19

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CategoryMaster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='CustomerInquiry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField()),
                ('updated_at', models.DateTimeField()),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rq_user_agent', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='KnowledgeBase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.TextField()),
                ('created_at', models.DateTimeField()),
                ('updated_at', models.DateTimeField()),
                ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='questionnaire.CategoryMaster')),
                ('parrent_question', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='questionnaire.KnowledgeBase')),
            ],
        ),
        migrations.CreateModel(
            name='SubCategoryMaster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subcategory_name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='QuestionChoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('choice', models.CharField(max_length=30)),
                ('next_question', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='rq_next_question', to='questionnaire.KnowledgeBase')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rq_question', to='questionnaire.KnowledgeBase')),
            ],
        ),
        migrations.AddField(
            model_name='knowledgebase',
            name='subcategory',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='questionnaire.SubCategoryMaster'),
        ),
        migrations.CreateModel(
            name='InquiryDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField()),
                ('updated_at', models.DateTimeField()),
                ('inquiry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questionnaire.CustomerInquiry')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questionnaire.QuestionChoice')),
            ],
        ),
    ]
