# Generated by Django 2.1.3 on 2019-01-05 17:01

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('family_name', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('first_name', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('family_name_kana', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('first_name_kana', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('birth_date', models.DateField(blank=True, default=None, null=True)),
                ('gender', models.CharField(blank=True, default=None, max_length=10, null=True)),
                ('postal_code', models.CharField(max_length=10)),
                ('prefecture', models.CharField(max_length=50)),
                ('city', models.CharField(max_length=50)),
                ('town', models.CharField(max_length=50)),
                ('building', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('company', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('job_title', models.CharField(blank=True, default=None, max_length=10, null=True)),
                ('phone', models.CharField(blank=True, default=None, max_length=20, null=True)),
                ('email', models.EmailField(blank=True, default=None, max_length=254, null=True)),
                ('url', models.URLField(blank=True, default=None, null=True)),
            ],
            options={
                'verbose_name': 'Contact',
                'verbose_name_plural': 'Contacts',
            },
            bases=(models.Model, contacts.models.methods.Contact),
        ),
        migrations.CreateModel(
            name='Family',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('family_name', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('first_name', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('family_name_kana', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('first_name_kana', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('birth_date', models.DateField(blank=True, default=None, null=True)),
                ('gender', models.CharField(blank=True, default=None, max_length=10, null=True)),
                ('role', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('suffix', models.CharField(blank=True, default=None, max_length=50, null=True)),
                ('ordinal', models.IntegerField(default=0)),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contacts.Contact')),
            ],
            options={
                'verbose_name': 'Family',
                'verbose_name_plural': 'Families',
                'ordering': ['contact', 'ordinal'],
            },
        ),
        migrations.CreateModel(
            name='Outbound',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('title', models.CharField(max_length=100)),
                ('poc', models.CharField(max_length=50)),
                ('template', models.TextField(blank=True, default=None, null=True)),
                ('contact_from', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contacts.Contact')),
                ('owner', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Outbound',
                'verbose_name_plural': 'Outbounds',
            },
        ),
        migrations.CreateModel(
            name='OutboundTo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('closed', models.BooleanField(default=False)),
                ('closed_at', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Closed At')),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contacts.Contact')),
                ('outbound', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contacts.Outbound')),
            ],
            options={
                'verbose_name': 'Outbound To',
                'verbose_name_plural': 'Outbound Tos',
            },
        ),
    ]
