# Generated by Django 2.2.1 on 2019-06-02 12:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Beacon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('modelo', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Camara',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('modelo', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Compra',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField()),
                ('total', models.IntegerField()),
                ('cedula', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Entrada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('abierto', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='EntradaP',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sexo', models.CharField(max_length=10)),
                ('edad', models.IntegerField()),
                ('macadd', models.CharField(blank=True, max_length=20, null=True)),
                ('registroe', models.DateTimeField(blank=True, null=True)),
                ('fkcamara', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Camara')),
            ],
        ),
        migrations.CreateModel(
            name='Mesa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('puestos', models.IntegerField()),
                ('fkbeacon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Beacon')),
            ],
        ),
        migrations.CreateModel(
            name='Tienda',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=20)),
                ('dueño', models.CharField(max_length=20)),
                ('horaA', models.DateTimeField()),
                ('horaC', models.DateTimeField()),
                ('fkbeacon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Beacon')),
            ],
        ),
        migrations.CreateModel(
            name='SalidaP',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('registros', models.DateTimeField()),
                ('macadd', models.CharField(max_length=20)),
                ('fkcamara', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Camara')),
            ],
        ),
        migrations.CreateModel(
            name='RegistroT',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mac', models.CharField(max_length=20)),
                ('fecha', models.DateTimeField()),
                ('io', models.BooleanField()),
                ('fkbeacon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Beacon')),
            ],
        ),
        migrations.CreateModel(
            name='RegistroM',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mac', models.CharField(max_length=20)),
                ('fecha', models.DateTimeField()),
                ('io', models.BooleanField()),
                ('fkmesa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Mesa')),
            ],
        ),
        migrations.CreateModel(
            name='Persona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=20)),
                ('apellido', models.CharField(max_length=20)),
                ('cedula', models.IntegerField(unique=True)),
                ('macadd', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.EntradaP')),
            ],
        ),
        migrations.CreateModel(
            name='CompraEntrada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fechaentrada', models.DateTimeField()),
                ('fkcompra', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Compra')),
            ],
        ),
        migrations.AddField(
            model_name='compra',
            name='fkpersona',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Persona'),
        ),
        migrations.AddField(
            model_name='compra',
            name='fktienda',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Tienda'),
        ),
        migrations.AddField(
            model_name='camara',
            name='fkentrada',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.Entrada'),
        ),
    ]
