# Generated by Django 3.1 on 2020-11-25 17:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='articulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('precio_venta', models.FloatField()),
                ('costo_compra', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=41)),
                ('creacion', models.DateTimeField(auto_now_add=True)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Estilo',
            fields=[
                ('id_estilo', models.BigAutoField(primary_key=True, serialize=False)),
                ('estilo', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='OpcionesMenu',
            fields=[
                ('id_opcion', models.BigAutoField(primary_key=True, serialize=False)),
                ('opcion', models.CharField(max_length=50)),
                ('url', models.CharField(max_length=50)),
                ('id_rol', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Proveedor',
            fields=[
                ('id_proveedor', models.BigAutoField(primary_key=True, serialize=False)),
                ('proveedor', models.CharField(max_length=50)),
                ('total_deuda', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Rol',
            fields=[
                ('id_rol', models.BigAutoField(primary_key=True, serialize=False)),
                ('rol', models.CharField(max_length=50)),
                ('descripcion', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='venta',
            fields=[
                ('numero_venta', models.BigAutoField(primary_key=True, serialize=False)),
                ('cantidad', models.IntegerField()),
                ('articulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuentasporcobrar.articulo')),
                ('cliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuentasporcobrar.cliente')),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('estilo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuentasporcobrar.estilo')),
                ('rol', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuentasporcobrar.rol')),
                ('usuario', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='pedido',
            fields=[
                ('numero_pedido', models.BigAutoField(primary_key=True, serialize=False)),
                ('creacion', models.DateTimeField(auto_now_add=True)),
                ('descripcion', models.TextField()),
                ('cantidad', models.IntegerField()),
                ('articulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuentasporcobrar.articulo')),
            ],
        ),
        migrations.CreateModel(
            name='ordenpago',
            fields=[
                ('numero_orden', models.BigAutoField(primary_key=True, serialize=False)),
                ('creacion', models.DateTimeField(auto_now_add=True)),
                ('cantidad', models.FloatField()),
                ('proveedor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuentasporcobrar.proveedor')),
            ],
        ),
        migrations.AddField(
            model_name='articulo',
            name='proveedor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuentasporcobrar.proveedor'),
        ),
    ]
