# Generated by Django 2.0.5 on 2018-09-12 13:12

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


class Migration(migrations.Migration):

    dependencies = [
        ('user_profile', '0002_auto_20180912_1231'),
    ]

    operations = [
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contact', models.CharField(max_length=20)),
                ('sort', models.PositiveSmallIntegerField(default=1, verbose_name='Порядок сортировки')),
            ],
            options={
                'verbose_name': 'Тип контакта',
                'verbose_name_plural': 'Типы контактов',
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='ContactType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=40)),
            ],
            options={
                'verbose_name': 'Тип контакта',
                'verbose_name_plural': 'Типы контактов',
            },
        ),
        migrations.AddField(
            model_name='user',
            name='is_worker',
            field=models.BooleanField(default=True, verbose_name='Клиент'),
        ),
        migrations.AddField(
            model_name='contact',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user_profile.ContactType', verbose_name='Тип контакта'),
        ),
        migrations.AddField(
            model_name='user',
            name='contact',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='user_profile.Contact'),
        ),
    ]
