# Generated by Django 3.0.5 on 2020-04-14 18:59

from django.conf import settings
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='Choreographer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=50, verbose_name='Фамилия-Имя')),
                ('country', models.CharField(max_length=50, verbose_name='Страна')),
                ('birth_date', models.DateField()),
                ('biography', models.TextField(verbose_name='О себе')),
            ],
            options={
                'verbose_name': 'Хореограф',
                'verbose_name_plural': 'Хореографы',
            },
        ),
        migrations.CreateModel(
            name='DanceStyle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Стиль')),
                ('info', models.TextField(verbose_name='Информация о стиле')),
            ],
            options={
                'verbose_name': 'Стиль',
                'verbose_name_plural': 'Стили',
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Название')),
                ('address', models.CharField(max_length=100, verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Локация',
                'verbose_name_plural': 'Локации',
            },
        ),
        migrations.CreateModel(
            name='Master',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('head', models.CharField(max_length=100, verbose_name='Хореограф + стиль')),
                ('choreographer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workshops.Choreographer', verbose_name='Хоерограф')),
                ('style', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workshops.DanceStyle', verbose_name='Стиль')),
            ],
        ),
        migrations.CreateModel(
            name='Workshop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(verbose_name='Дата мастер-класса')),
                ('time', models.TimeField(verbose_name='Время')),
                ('duration', models.IntegerField(verbose_name='Продолжительность')),
                ('cost', models.IntegerField(verbose_name='Цена')),
                ('level', models.CharField(choices=[('L1', 'Начинающий'), ('L2', 'Продвинутый'), ('L3', 'Любой')], max_length=20, verbose_name='Уроовень подготовки')),
                ('info', models.TextField(verbose_name='Информация')),
                ('heading', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workshops.Master', verbose_name='Стиль + Педагог')),
                ('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workshops.Location', verbose_name='Место проведения')),
            ],
            options={
                'verbose_name': 'Мастер-класс',
                'verbose_name_plural': 'Мастер-классы',
            },
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(verbose_name='Комментарий')),
                ('created', models.DateField(auto_now_add=True, null=True, verbose_name='Дата добавления')),
                ('moderation', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')),
                ('workshop', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workshops.Workshop', verbose_name='Мастер-класс')),
            ],
            options={
                'verbose_name': 'Комментарий',
                'verbose_name_plural': 'Комментарии',
            },
        ),
        migrations.AddField(
            model_name='choreographer',
            name='style',
            field=models.ManyToManyField(through='workshops.Master', to='workshops.DanceStyle', verbose_name='Стиль'),
        ),
    ]
