# Generated by Django 3.1.1 on 2020-09-29 14:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120, verbose_name='título')),
            ],
            options={
                'verbose_name': 'Categoria',
                'verbose_name_plural': 'Categorias',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120, verbose_name='nome')),
                ('description', models.TextField(blank=True, max_length=254, null=True, verbose_name='descrição')),
                ('price', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, verbose_name='preço')),
                ('image', models.ImageField(blank=True, max_length=254, null=True, upload_to='product', verbose_name='foto')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='criado em')),
                ('updated_at', models.DateTimeField(auto_now_add=True, verbose_name='atualizado em')),
                ('is_active', models.BooleanField(default=True, verbose_name='ativo')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='all_products', to='core.category')),
                ('sub_categories', models.ManyToManyField(to='core.Category')),
            ],
            options={
                'verbose_name': 'Produto',
                'verbose_name_plural': 'Produtos',
            },
        ),
    ]
