# Generated by Django 3.0 on 2019-12-05 06:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(max_length=10, unique=True)),
                ('is_empty', models.BooleanField(default=True)),
                ('measurer', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='measured_rooms', to=settings.AUTH_USER_MODEL)),
                ('owners', models.ManyToManyField(related_name='owned_rooms', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Measure',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('power_intake', models.IntegerField(default=0)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.Room')),
            ],
            options={
                'ordering': ['created'],
            },
        ),
    ]
