# Generated by Django 3.2.3 on 2021-05-21 08:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Elevator',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
                ('algo', models.CharField(max_length=100)),
                ('range_max_floor', models.SmallIntegerField()),
                ('range_min_floor', models.SmallIntegerField()),
                ('set_lobby_floor', models.SmallIntegerField()),
                ('speed_floor', models.DecimalField(decimal_places=2, max_digits=2)),
                ('speed_open', models.DecimalField(decimal_places=2, max_digits=2)),
                ('speed_close', models.DecimalField(decimal_places=2, max_digits=2)),
                ('status', models.SmallIntegerField(choices=[(0, 'Disabled'), (1, 'Enabled'), (99, 'Alert')], default=0)),
                ('current_direction', models.CharField(choices=[('IDLE', 'Idle'), ('UP', 'Up'), ('DOWN', 'Down')], default='IDLE', max_length=4)),
                ('current_floor', models.SmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='PressBtnQ',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('direction', models.CharField(choices=[('IDLE', 'Idle'), ('UP', 'Up'), ('DOWN', 'Down')], default='IDLE', max_length=4)),
                ('start_floor', models.SmallIntegerField()),
                ('final_floor', models.SmallIntegerField()),
                ('create_time', models.TimeField(auto_now=True)),
                ('waiting_indicator', models.CharField(blank=True, max_length=30, null=True)),
                ('elevator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='elevatorq.elevator')),
            ],
        ),
        migrations.CreateModel(
            name='ElevatorQ',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.TimeField(auto_now=True)),
                ('direction', models.CharField(choices=[('IDLE', 'Idle'), ('UP', 'Up'), ('DOWN', 'Down')], default='IDLE', max_length=4)),
                ('floor', models.SmallIntegerField()),
                ('door', models.SmallIntegerField(choices=[(1, 'Open'), (0, 'Close')], default=0)),
                ('elevator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='elevatorq.elevator')),
            ],
        ),
    ]
