# Generated by Django 3.1.6 on 2021-02-19 09:50

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('products', '0002_auto_20210219_0655'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Coupons',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Cupon')),
                ('discount', models.FloatField(verbose_name='Descuento en %')),
            ],
        ),
        migrations.CreateModel(
            name='Orders_Detail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('payments_type', models.CharField(max_length=50, verbose_name='Tipo de Pago')),
                ('price', models.FloatField(verbose_name='Precio')),
                ('productId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='products.product', verbose_name='Productos Comprados')),
            ],
            options={
                'verbose_name': 'Detalle',
                'verbose_name_plural': 'Detalles ',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('number', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='Numero de Orden')),
                ('state', models.BooleanField(default=False, verbose_name='Estado de la Orden')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de la Orden')),
                ('customers', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Clientes')),
                ('details', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='detail', to='payments.orders_detail', verbose_name='Detalle de la Orden')),
            ],
            options={
                'verbose_name': 'Orden',
                'verbose_name_plural': 'Ordenes',
            },
        ),
    ]
