# Generated by Django 2.2 on 2019-04-09 16:06

from django.conf import settings
import django.core.validators
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='Walker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo', models.ImageField(upload_to='', verbose_name='Аватар')),
                ('birth_date', models.DateField(verbose_name='Дата рождения')),
                ('phone', models.CharField(blank=True, max_length=12, validators=[django.core.validators.RegexValidator(message="Телефонный номер должен быть в формате: '+79999999999'", regex='^\\+7\\d{10}$')], verbose_name='Телефон')),
            ],
        ),
        migrations.CreateModel(
            name='WalkingZone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='Название района')),
            ],
        ),
        migrations.CreateModel(
            name='WalkingDate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day', models.IntegerField()),
                ('hour', models.IntegerField(validators=[django.core.validators.MinValueValidator(7), django.core.validators.MaxValueValidator(22)])),
                ('dog_owner_name', models.CharField(max_length=50)),
                ('street', models.CharField(max_length=30)),
                ('walker', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ags_site.Walker')),
            ],
        ),
        migrations.AddField(
            model_name='walker',
            name='blue_zones',
            field=models.ManyToManyField(related_name='blue_zones', to='ags_site.WalkingZone', verbose_name='Голубые зоны'),
        ),
        migrations.AddField(
            model_name='walker',
            name='green_zones',
            field=models.ManyToManyField(related_name='green_zones', to='ags_site.WalkingZone', verbose_name='Зеленые зоны'),
        ),
        migrations.AddField(
            model_name='walker',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь'),
        ),
    ]
