# Generated by Django 3.0.7 on 2020-06-10 12:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Имя')),
                ('carrying', models.PositiveSmallIntegerField(default=0, verbose_name='Грузоподъемность')),
                ('length', models.PositiveSmallIntegerField(verbose_name='Длина')),
                ('width', models.PositiveSmallIntegerField(verbose_name='Ширина')),
                ('height', models.PositiveSmallIntegerField(verbose_name='Высота')),
                ('payment', models.PositiveSmallIntegerField(verbose_name='Оплата')),
                ('description', models.TextField(verbose_name='Описание')),
                ('url', models.SlugField(max_length=130, unique=True)),
            ],
            options={
                'verbose_name': 'Машина',
                'verbose_name_plural': 'Машины',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='Категория')),
                ('description', models.TextField(verbose_name='Описание')),
                ('url', models.SlugField(max_length=160, unique=True)),
            ],
            options={
                'verbose_name': 'Категория',
                'verbose_name_plural': 'Категории',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Имя')),
                ('surname', models.CharField(max_length=100, verbose_name='Фамилия')),
                ('phone', models.CharField(max_length=20, verbose_name='Телефон')),
                ('email', models.EmailField(max_length=254)),
                ('city', models.CharField(default='Новосибирск', max_length=50, verbose_name='Город')),
                ('image', models.ImageField(upload_to='actors/', verbose_name='Изображение')),
            ],
            options={
                'verbose_name': 'Пользователь',
                'verbose_name_plural': 'Пользователи',
            },
        ),
        migrations.CreateModel(
            name='Reviews',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.EmailField(max_length=254)),
                ('name', models.CharField(max_length=100, verbose_name='Имя')),
                ('text', models.TextField(max_length=5000, verbose_name='Сообщение')),
                ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.Car', verbose_name='фильм')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Reviews', verbose_name='Родитель')),
            ],
            options={
                'verbose_name': 'Отзыв',
                'verbose_name_plural': 'Отзывы',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Заголовок')),
                ('from_address', models.CharField(max_length=100, verbose_name='Откуда')),
                ('to_address', models.CharField(max_length=100, verbose_name='Куда')),
                ('date', models.DateField(default=datetime.date.today, verbose_name='Дата перевозки')),
                ('weight', models.PositiveSmallIntegerField(verbose_name='Вес')),
                ('length', models.PositiveSmallIntegerField(verbose_name='Длина')),
                ('width', models.PositiveSmallIntegerField(verbose_name='Ширина')),
                ('height', models.PositiveSmallIntegerField(verbose_name='Высота')),
                ('count', models.PositiveSmallIntegerField(verbose_name='Количество')),
                ('payment', models.CharField(max_length=50, verbose_name='Оплата')),
                ('description', models.TextField(verbose_name='Описание')),
                ('image', models.ImageField(upload_to='movie_shots/', verbose_name='Изображение')),
                ('url', models.SlugField(max_length=130, unique=True)),
                ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Category', verbose_name='Категория')),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.User', verbose_name='Клиент')),
            ],
            options={
                'verbose_name': 'Заявка',
                'verbose_name_plural': 'Заявки',
            },
        ),
        migrations.AddField(
            model_name='car',
            name='driver',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='web.User', verbose_name='Водитель'),
        ),
    ]
