# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-25 16:47
from __future__ import unicode_literals

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

from guiaofertas.apps.ofertas.models import Oferta


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('taggit', '0002_auto_20150616_2121'),
        ('empresas', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='Modificado em')),
                ('nome', models.CharField(max_length=60, verbose_name='Categoria')),
                ('slug', models.SlugField(max_length=300, unique=True, verbose_name='Identificador')),
                ('cat_pai', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subcategorias', to='ofertas.Categoria', verbose_name='Categoria Pai')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Oferta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Criado em')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='Modificado em')),
                ('produto', models.CharField(max_length=100, verbose_name='Produto')),
                ('slug', models.SlugField(max_length=300, unique=True, verbose_name='Identificador')),
                ('descricao', models.CharField(blank=True, max_length=250, null=True, verbose_name='Descrição')),
                ('preco_anterior', models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True, verbose_name='Preço Anterior')),
                ('desconto', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True, verbose_name='Desconto (%)')),
                ('novo_preco', models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True, verbose_name='Novo Preço')),
                ('inicio_oferta', models.DateTimeField(verbose_name='Início da Oferta')),
                ('fim_oferta', models.DateTimeField(verbose_name='Término da Oferta')),
                ('foto', models.ImageField(upload_to=Oferta.upload_to, verbose_name='Foto')),
                ('categoria', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ofertas', to='ofertas.Categoria', verbose_name='Categoria')),
                ('empresa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ofertas', to='empresas.Empresa', verbose_name='Empresa')),
                ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
