# Generated by Django 3.2 on 2021-07-23 19:55

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Atracciones',
            fields=[
                ('id_atraccion', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254, unique=True)),
                ('capacidad', models.SmallIntegerField()),
                ('fecha', models.DateField(max_length=254)),
                ('precio', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Aviso',
            fields=[
                ('id_aviso', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254)),
                ('imagen', models.ImageField(upload_to='Aviso', validators=[diverty.models.validate_image])),
            ],
        ),
        migrations.CreateModel(
            name='Boletas_producto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codigo_producto', models.CharField(max_length=20, unique=True)),
                ('nombre_boleta_producto', models.CharField(max_length=100)),
                ('foto', models.ImageField(upload_to='productos', validators=[diverty.models.validate_image])),
                ('precio', models.IntegerField()),
                ('stock', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Clientes',
            fields=[
                ('id_cliente', models.AutoField(primary_key=True, serialize=False)),
                ('identificacion', models.IntegerField(unique=True)),
                ('nombre', models.CharField(max_length=254)),
                ('apellido', models.CharField(max_length=254)),
                ('edad', models.IntegerField()),
                ('direccion', models.CharField(max_length=150)),
                ('telefono', models.CharField(max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='Empleados',
            fields=[
                ('id_empleado', models.AutoField(primary_key=True, serialize=False)),
                ('identificacion', models.IntegerField(unique=True)),
                ('nombre', models.CharField(max_length=100)),
                ('apellido', models.CharField(max_length=100)),
                ('correo', models.EmailField(max_length=200, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Pedido',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(verbose_name='Fecha y hora del pedido')),
                ('direccion_de_envio', models.CharField(max_length=254)),
                ('estado', models.CharField(choices=[('1', 'Nuevo'), ('2', 'Confirmado'), ('3', 'Enviado'), ('4', 'Cancelado')], default='1', max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Promociones',
            fields=[
                ('id_promocion', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254)),
                ('precio', models.IntegerField()),
                ('fecha', models.DateField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('usuario', models.CharField(default='', max_length=100, unique=True)),
                ('correo', models.EmailField(max_length=200, unique=True)),
                ('clave', models.CharField(max_length=254)),
                ('rol', models.IntegerField(choices=[(1, 'Administrador'), (2, 'Empleado'), (3, 'Cliente')], default=3)),
            ],
        ),
        migrations.CreateModel(
            name='Ventas',
            fields=[
                ('id_venta', models.AutoField(primary_key=True, serialize=False)),
                ('fecha', models.DateField(max_length=254)),
                ('costo', models.IntegerField()),
                ('boletas', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='diverty.boletas_producto')),
                ('clientes', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='diverty.clientes')),
            ],
        ),
        migrations.CreateModel(
            name='Reservas',
            fields=[
                ('id_reserva', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=254)),
                ('fecha', models.DateField()),
                ('atracciones_reservas', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='reservas_atracciones', to='diverty.atracciones')),
            ],
        ),
        migrations.CreateModel(
            name='PedidoProducto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
                ('precio', models.IntegerField()),
                ('pedido', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='diverty.pedido')),
                ('producto', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='diverty.boletas_producto')),
            ],
        ),
        migrations.AddField(
            model_name='pedido',
            name='cliente',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='diverty.usuario'),
        ),
        migrations.AddField(
            model_name='boletas_producto',
            name='descuento',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.DO_NOTHING, to='diverty.promociones'),
        ),
    ]
