# Generated by Django 3.1.7 on 2021-04-14 07:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Марка мотоцикла')),
                ('slug', models.SlugField(max_length=255, unique=True, verbose_name='URL')),
            ],
            options={
                'verbose_name': 'Марка мотоцикла',
                'verbose_name_plural': 'Марки мотоциклов',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Категория')),
                ('slug', models.SlugField(max_length=255, unique=True, verbose_name='URl')),
            ],
            options={
                'verbose_name': 'Категория мотоцикла',
                'verbose_name_plural': 'Категории мотоциклов',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Motorcycle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('model', models.CharField(max_length=255, verbose_name='Модель')),
                ('slug', models.SlugField(max_length=255, unique=True, verbose_name='URL')),
                ('content', models.TextField(blank=True, verbose_name='Описание мотоцикла')),
                ('photo', models.ImageField(upload_to='photos/%Y/%m/%d/', verbose_name='Фотография')),
                ('time_create', models.DateTimeField(auto_now_add=True, verbose_name='Дата публикации')),
                ('time_update', models.DateTimeField(auto_now=True, verbose_name='Дата обновления')),
                ('is_published', models.BooleanField(default=True, verbose_name='Публикации')),
                ('brand', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='moto_forum.brand', verbose_name='Марка мотоцикла')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='moto_forum.category', verbose_name='Категория мотоцикла')),
            ],
            options={
                'verbose_name': 'Мотоцикл пользователя',
                'verbose_name_plural': 'Мотоциклы Пользователей',
                'ordering': ['is_published', 'time_create'],
            },
        ),
    ]
