# Generated by Django 3.1.1 on 2020-09-09 20:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='PowerPlant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('plant_name', models.CharField(max_length=100, verbose_name='Plant Name')),
                ('plant_location', models.CharField(max_length=100, verbose_name='Plant Location')),
                ('created_on', models.DateTimeField(editable=False)),
                ('updated_on', models.DateTimeField(editable=False)),
                ('active', models.BooleanField(default=True, verbose_name='Active')),
            ],
            options={
                'verbose_name': 'Power Plant',
                'verbose_name_plural': 'Power Plants',
            },
        ),
        migrations.CreateModel(
            name='SensorType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_name', models.CharField(max_length=50, verbose_name='Type Name')),
                ('unit_symbol', models.CharField(max_length=10, verbose_name='Unit Symbol')),
                ('unit_name', models.CharField(max_length=50, verbose_name='Unit Name')),
                ('created_on', models.DateTimeField(editable=False)),
                ('updated_on', models.DateTimeField(editable=False)),
                ('active', models.BooleanField(default=True, verbose_name='Active')),
            ],
            options={
                'verbose_name': 'Sensor Type',
                'verbose_name_plural': 'Sensor Types',
            },
        ),
        migrations.CreateModel(
            name='SensorReading',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reading_parameter', models.CharField(max_length=100)),
                ('reading_value', models.FloatField()),
                ('reading_datetime', models.DateTimeField()),
                ('power_plant', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='plant_readings', to='core.powerplant', verbose_name='Power Plant')),
                ('sensor_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sensor_readings', to='core.sensortype', verbose_name='Sensor Type')),
            ],
            options={
                'verbose_name': 'Sensor Reading',
                'verbose_name_plural': 'Sensor Readings',
            },
        ),
    ]
