# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-03-23 17:06
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=200)),
                ('code', models.CharField(max_length=200, unique=True)),
                ('last_seen', models.DateTimeField()),
                ('data', models.CharField(default='', max_length=200, null=True)),
                ('value', models.FloatField(default=0, null=True)),
                ('state', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Parameter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=200)),
                ('value', models.CharField(default='', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Actuator',
            fields=[
                ('device_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='device.Device')),
                ('parameters', models.ManyToManyField(null=True, to='device.Parameter')),
            ],
            bases=('device.device',),
        ),
        migrations.CreateModel(
            name='Sensor',
            fields=[
                ('device_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='device.Device')),
            ],
            bases=('device.device',),
        ),
    ]
