# Generated by Django 2.2.4 on 2019-08-17 19:43

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('tenants', '0001_initial'),
        ('ds', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='rulebook',
            name='update_user',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='更新ユーザー管理ID'),
        ),
        migrations.AddField(
            model_name='kintone_key',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='keyword',
            name='anken',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Anken', verbose_name='商談案件管理ID'),
        ),
        migrations.AddField(
            model_name='keyword',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='keyword',
            name='dictionary',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Dictionary', verbose_name='辞書管理ID'),
        ),
        migrations.AddField(
            model_name='keyword',
            name='history',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.History', verbose_name='商談履歴管理ID'),
        ),
        migrations.AddField(
            model_name='keyword',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='history',
            name='anken',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Anken', verbose_name='商談案件管理ID'),
        ),
        migrations.AddField(
            model_name='history',
            name='customer',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='history',
            name='employee',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Employee', verbose_name='社員管理ID'),
        ),
        migrations.AddField(
            model_name='history',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='employee',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='dictionary',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='dictionary',
            name='update_user',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='更新ユーザー管理ID'),
        ),
        migrations.AddField(
            model_name='customer_news',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='customer_news',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='customer',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='anken_successrt_history',
            name='anken',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Anken', verbose_name='商談案件管理ID'),
        ),
        migrations.AddField(
            model_name='anken_successrt_history',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='anken_successrt_history',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='anken_successrt_cmt',
            name='anken',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Anken', verbose_name='商談案件管理ID'),
        ),
        migrations.AddField(
            model_name='anken_successrt_cmt',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='anken_successrt_cmt',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='anken_successrt',
            name='anken',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Anken', verbose_name='商談案件管理ID'),
        ),
        migrations.AddField(
            model_name='anken_successrt',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='anken_successrt',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='anken_near',
            name='anken',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='anken', to='ds.Anken', verbose_name='商談案件管理ID'),
        ),
        migrations.AddField(
            model_name='anken_near',
            name='anken_near',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='anken_near', to='ds.Anken', verbose_name='商談案件管理ID（類似）'),
        ),
        migrations.AddField(
            model_name='anken_near',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='anken_near',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='anken_advice',
            name='anken',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Anken', verbose_name='商談案件管理ID'),
        ),
        migrations.AddField(
            model_name='anken_advice',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='anken_advice',
            name='rulebook',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Rulebook', verbose_name='ルールブック管理ID'),
        ),
        migrations.AddField(
            model_name='anken_advice',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AddField(
            model_name='anken',
            name='customer',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Customer', verbose_name='顧客管理ID'),
        ),
        migrations.AddField(
            model_name='anken',
            name='employee',
            field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ds.Employee', verbose_name='社員管理ID'),
        ),
        migrations.AddField(
            model_name='anken',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.Tenant'),
        ),
        migrations.AlterUniqueTogether(
            name='rulebook',
            unique_together={('tenant', 'name', 'ruletype')},
        ),
        migrations.AlterUniqueTogether(
            name='kintone_key',
            unique_together={('tenant', 'app_id')},
        ),
        migrations.AlterUniqueTogether(
            name='keyword',
            unique_together={('tenant', 'history', 'dictionary')},
        ),
        migrations.AlterUniqueTogether(
            name='history',
            unique_together={('tenant', 'no')},
        ),
        migrations.AlterUniqueTogether(
            name='employee',
            unique_together={('tenant', 'no')},
        ),
        migrations.AlterUniqueTogether(
            name='dictionary',
            unique_together={('tenant', 'grpname', 'typekbn')},
        ),
        migrations.AlterUniqueTogether(
            name='customer_news',
            unique_together={('tenant', 'customer', 'news_no')},
        ),
        migrations.AlterUniqueTogether(
            name='customer',
            unique_together={('tenant', 'no')},
        ),
        migrations.AlterUniqueTogether(
            name='anken_successrt_history',
            unique_together={('tenant', 'customer', 'anken', 'created_dt')},
        ),
        migrations.AlterUniqueTogether(
            name='anken_successrt',
            unique_together={('tenant', 'customer', 'anken')},
        ),
        migrations.AlterUniqueTogether(
            name='anken_near',
            unique_together={('tenant', 'customer', 'anken', 'anken_near')},
        ),
        migrations.AlterUniqueTogether(
            name='anken_advice',
            unique_together={('tenant', 'customer', 'anken', 'rulebook')},
        ),
        migrations.AlterUniqueTogether(
            name='anken',
            unique_together={('tenant', 'no')},
        ),
    ]
