# Generated by Django 3.1.4 on 2021-02-23 01:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('cliente_id', models.AutoField(primary_key=True, serialize=False)),
                ('cedula', models.CharField(max_length=10, unique=True)),
                ('nombres', models.CharField(max_length=70)),
                ('apellidos', models.CharField(max_length=70)),
                ('genero', models.CharField(choices=[('femenino', 'Femenino'), ('masculino', 'Masculino')], default='masculino', max_length=30)),
                ('correo', models.EmailField(max_length=105)),
                ('telefono', models.CharField(max_length=15)),
                ('direccion', models.TextField(max_length=200)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Producto',
            fields=[
                ('producto_id', models.AutoField(primary_key=True, serialize=False)),
                ('codigo', models.IntegerField(unique=True)),
                ('nombre', models.CharField(max_length=70)),
                ('stock', models.IntegerField(unique=True)),
                ('precio_Unitario', models.DecimalField(decimal_places=2, max_digits=10)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Compra',
            fields=[
                ('compra_id', models.AutoField(primary_key=True, serialize=False)),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('numero_Productos', models.IntegerField(unique=True)),
                ('valor_Total', models.DecimalField(decimal_places=2, max_digits=10)),
                ('descripcion', models.TextField(default='Descripción de la compra')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('updated_ad', models.DateTimeField(auto_now_add=True)),
                ('cliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='modelo.cliente')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='modelo.producto')),
            ],
        ),
    ]
