# Generated by Django 2.2 on 2020-10-10 17:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, null=True, verbose_name='Название')),
                ('text', models.TextField(blank=True, verbose_name='Описание')),
                ('img', models.ImageField(blank=True, upload_to='catalog_img', verbose_name='Картинка')),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, null=True, verbose_name='Название')),
                ('text', models.TextField(blank=True, verbose_name='Описание')),
                ('img', models.ImageField(blank=True, upload_to='product_img', verbose_name='Картинка')),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=6, verbose_name='Цена')),
                ('count', models.IntegerField(default=0, verbose_name='Количество')),
                ('is_active', models.BooleanField(default=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainapp.Catalog', verbose_name='Категория')),
            ],
        ),
    ]
