# Generated by Django 3.1.5 on 2021-05-20 17:35

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Actividad',
            fields=[
                ('id_actividad', models.AutoField(primary_key=True, serialize=False)),
                ('nombre_actividad', models.CharField(max_length=254)),
                ('horario', models.DateTimeField()),
                ('desc_actividad', models.CharField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Inventario',
            fields=[
                ('id_inventario', models.AutoField(primary_key=True, serialize=False)),
                ('cantidad', models.SmallIntegerField()),
                ('valor_compra', models.IntegerField()),
                ('fecha_vencimiento', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Novedad',
            fields=[
                ('id_novedad', models.AutoField(primary_key=True, serialize=False)),
                ('tipo_novedad', models.CharField(max_length=254)),
                ('nombre_novedad', models.CharField(max_length=254)),
                ('desc_novedad', models.CharField(max_length=254)),
                ('fecha', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Producto',
            fields=[
                ('id_producto', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254)),
                ('valor_venta', models.IntegerField()),
                ('inventario', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.inventario')),
            ],
        ),
        migrations.CreateModel(
            name='Proveedor',
            fields=[
                ('id_proveedor', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254)),
                ('direccion', models.CharField(max_length=254)),
                ('telefono', models.CharField(max_length=15)),
                ('correo', models.EmailField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='registroUsuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=200)),
                ('apellido', models.CharField(max_length=200)),
                ('correo', models.EmailField(max_length=200)),
                ('contrasena', models.CharField(max_length=200)),
                ('rol', models.IntegerField(choices=[(1, 'Administrador'), (2, 'Empleado'), (3, 'Usuario')], default=3)),
            ],
        ),
        migrations.CreateModel(
            name='Tipo_Documento',
            fields=[
                ('id_tipoDocumento', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Tipo_Usuario',
            fields=[
                ('id_tipoUsuario', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id_Usuario', models.AutoField(primary_key=True, serialize=False)),
                ('num_documento', models.IntegerField(unique=True)),
                ('nombre_usuario', models.CharField(max_length=254)),
                ('apellido_usuario', models.CharField(max_length=254)),
                ('direccion', models.CharField(max_length=254)),
                ('telefono', models.CharField(max_length=15)),
                ('correo', models.EmailField(max_length=200)),
                ('documento', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.tipo_documento')),
                ('tipo_usuario', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.tipo_usuario')),
            ],
        ),
        migrations.CreateModel(
            name='Venta',
            fields=[
                ('id_venta', models.AutoField(primary_key=True, serialize=False)),
                ('tipo_venta', models.CharField(max_length=254)),
                ('desc_venta', models.CharField(max_length=254)),
                ('fecha', models.DateField(auto_now_add=True)),
                ('oferta_vigente', models.CharField(max_length=254)),
                ('valor_venta', models.IntegerField()),
                ('id_Usuario', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.usuario')),
            ],
        ),
        migrations.CreateModel(
            name='VentaxProducto',
            fields=[
                ('id_ventaxProducto', models.AutoField(primary_key=True, serialize=False)),
                ('id_producto', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.producto')),
                ('id_venta', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.venta')),
            ],
        ),
        migrations.CreateModel(
            name='UsuarioxNovedad',
            fields=[
                ('id_usuarioxNovedad', models.AutoField(primary_key=True, serialize=False)),
                ('id_Usuario', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.usuario')),
                ('id_novedad', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.novedad')),
            ],
        ),
        migrations.CreateModel(
            name='UsuarioxActividad',
            fields=[
                ('id_usuarioxActividad', models.AutoField(primary_key=True, serialize=False)),
                ('id_Usuario', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.usuario')),
                ('id_actividad', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.actividad')),
            ],
        ),
        migrations.AddField(
            model_name='inventario',
            name='proveedor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.proveedor'),
        ),
        migrations.CreateModel(
            name='Factura',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('valor_pagar', models.IntegerField()),
                ('descri_factura', models.CharField(max_length=254)),
                ('id_factura', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, to='gimnasio.venta')),
            ],
        ),
    ]
