# Generated by Django 2.0 on 2020-03-15 18:10

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='Consumption',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('consumption', models.DecimalField(decimal_places=16, max_digits=32)),
                ('date', models.DateTimeField()),
                ('year', models.SmallIntegerField()),
                ('month', models.SmallIntegerField()),
                ('week', models.SmallIntegerField()),
                ('day', models.SmallIntegerField()),
                ('hour', models.SmallIntegerField()),
                ('estimated', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='MeterInfo',
            fields=[
                ('meter_number', models.CharField(max_length=32, primary_key=True, serialize=False)),
                ('activity', models.CharField(max_length=128)),
                ('latitude', models.DecimalField(db_column='Lat', decimal_places=8, max_digits=16)),
                ('longitude', models.DecimalField(db_column='Long', decimal_places=8, max_digits=16)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='meter_info', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='consumption',
            name='meter_number',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='consumptions', to='naiades_dashboard.MeterInfo'),
        ),
    ]
