# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-24 20:46
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Mercadoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=45)),
                ('codigo', models.CharField(max_length=10)),
                ('preco', models.FloatField()),
                ('tipo', models.CharField(max_length=45)),
            ],
        ),
        migrations.CreateModel(
            name='Operacao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datahora', models.DateTimeField(auto_now=True)),
                ('quantidade', models.PositiveIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Compra',
            fields=[
                ('operacao_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='website.Operacao')),
                ('precoCompra', models.FloatField()),
            ],
            bases=('website.operacao',),
        ),
        migrations.CreateModel(
            name='Venda',
            fields=[
                ('operacao_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='website.Operacao')),
                ('precoVenda', models.FloatField()),
            ],
            bases=('website.operacao',),
        ),
        migrations.AddField(
            model_name='operacao',
            name='mercadoria',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='website.Mercadoria'),
        ),
    ]
