# Generated by Django 3.0.3 on 2020-02-20 21:40

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Rule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('name', models.CharField(default='', max_length=128)),
                ('start_time', models.TimeField(blank=True)),
                ('end_time', models.TimeField(blank=True, null=True)),
                ('temperature', models.FloatField(default=21.0)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WeekDay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('name', models.CharField(max_length=32)),
                ('order', models.IntegerField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Thermostat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('ain', models.CharField(max_length=64)),
                ('name', models.CharField(max_length=128)),
                ('rules', models.ManyToManyField(blank=True, to='thermostats.Rule')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='rule',
            name='weekdays',
            field=models.ManyToManyField(blank=True, to='thermostats.WeekDay'),
        ),
    ]
