# Generated by Django 2.2 on 2021-06-29 14:06

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('products', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('oiAmount', models.IntegerField(default=1, verbose_name='Cantidad')),
                ('ordered', models.BooleanField(default=False, verbose_name='Ordenado / Ordenar')),
                ('oiItem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.Products', verbose_name='Articulo')),
                ('oiUser', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Usuario')),
            ],
            options={
                'verbose_name': 'Articulo ordenado',
                'verbose_name_plural': 'Articulos ordenados',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shipping_calle', models.CharField(max_length=256, verbose_name='Calle')),
                ('shipping_number', models.CharField(max_length=256, verbose_name='Numero')),
                ('shipping_data', models.TextField(verbose_name='Dato')),
                ('shipping_phone', models.CharField(max_length=10, verbose_name='Telefono')),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('ordered_date', models.DateTimeField(auto_now_add=True)),
                ('ordered', models.BooleanField(default=False, verbose_name='Ordenado / Ordenar')),
                ('odItem', models.ManyToManyField(to='order.OrderItem', verbose_name='Articulo')),
                ('odUser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Usuario')),
            ],
            options={
                'verbose_name': 'Pedido',
                'verbose_name_plural': 'Pedidos',
                'ordering': ['-id'],
            },
        ),
    ]
