# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-22 02:41
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('tienda', '0011_auto_20160501_1822'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('status', models.CharField(choices=[('new', 'En proceso'), ('cancelled', 'Cancelada'), ('shipped', 'Enviada'), ('payment-pending', 'Pendiente de pago'), ('fully-paid', 'Pagada')], max_length=30, verbose_name='Estado')),
                ('shipping_address', models.CharField(max_length=100, verbose_name='Direcci\xf3n de env\xedo')),
                ('token', models.CharField(max_length=36, unique=True, verbose_name='Token')),
                ('shipping_method', models.CharField(max_length=30, verbose_name='M\xe9todo de env\xedo')),
                ('shipping_price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='Valor domicilio')),
                ('payment_method', models.CharField(max_length=30, verbose_name='M\xe9todo de pago')),
                ('payment_ref', models.CharField(max_length=50, verbose_name='Referencia de pago')),
                ('total', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='Total')),
                ('discounts', models.CharField(max_length=100, verbose_name='Descuentos aplicados')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tienda.StoreUser')),
            ],
        ),
        migrations.CreateModel(
            name='ProductOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_name', models.CharField(max_length=100, verbose_name='Nombre')),
                ('product_uid', models.CharField(max_length=32, verbose_name='Ref')),
                ('quantity', models.IntegerField(verbose_name='Cantidad')),
                ('price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='Precio')),
                ('discount', models.DecimalField(decimal_places=2, default=0, max_digits=12, verbose_name='Descuento')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tienda.Order')),
                ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tienda.Product')),
            ],
        ),
    ]
