# Generated by Django 2.2.4 on 2019-09-01 08:31

from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields
import utils.models


class Migration(migrations.Migration):

    dependencies = [
        ('location', '0009_auto_20190901_0831'),
        ('establishment', '0004_auto_20190828_1156'),
    ]

    operations = [
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Address')),
            ],
            options={
                'verbose_name': 'contact',
                'verbose_name_plural': 'contacts',
            },
        ),
        migrations.AlterField(
            model_name='establishment',
            name='description',
            field=utils.models.TJSONField(blank=True, default=None, help_text='{"en-GB":"some text"}', null=True, verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='establishment',
            name='name',
            field=utils.models.TJSONField(blank=True, default=None, help_text='{"en-GB":"some text"}', null=True, verbose_name='Name'),
        ),
        migrations.AlterField(
            model_name='establishmentsubtype',
            name='name',
            field=utils.models.TJSONField(blank=True, default=None, help_text='{"en-GB":"some text"}', null=True, verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='establishmenttype',
            name='name',
            field=utils.models.TJSONField(blank=True, default=None, help_text='{"en-GB":"some text"}', null=True, verbose_name='Description'),
        ),
        migrations.CreateModel(
            name='ContactPhone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', phonenumber_field.modelfields.PhoneNumberField(max_length=128)),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='phones', to='establishment.Contact')),
            ],
            options={
                'verbose_name': 'contact phone',
                'verbose_name_plural': 'contact phones',
            },
        ),
        migrations.CreateModel(
            name='ContactEmail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.EmailField(max_length=254)),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='emails', to='establishment.Contact')),
            ],
            options={
                'verbose_name': 'contact email',
                'verbose_name_plural': 'contact emails',
            },
        ),
        migrations.AddField(
            model_name='contact',
            name='establishment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to='establishment.Establishment'),
        ),
    ]
