# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-27 11:45
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='FlameSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='HallMagneticSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='HeartbeatSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='HumiditySensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='InfraredSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='LightSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='SoundSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='\u6807\u9898')),
                ('description', models.TextField(verbose_name='\u63cf\u8ff0')),
                ('completed', models.BooleanField(default=False, verbose_name='\u662f\u5426\u5b8c\u6210')),
                ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='\u521b\u5efa\u65f6\u95f4')),
            ],
        ),
        migrations.CreateModel(
            name='TemperatureMsg',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('temperature', models.FloatField(max_length=32, null=True)),
                ('pub_time', models.DateField(auto_now_add=True, null=True)),
            ],
            options={
                'ordering': ('temperatureSensor',),
            },
        ),
        migrations.CreateModel(
            name='TemperatureSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
                ('type', models.TextField(null=True)),
                ('maxTemperature', models.FloatField(max_length=32, null=True)),
                ('minTemperature', models.FloatField(max_length=32, null=True)),
                ('create_time', models.DateField(auto_now_add=True, null=True)),
            ],
            options={
                'ordering': ('deviceId',),
            },
        ),
        migrations.CreateModel(
            name='TouchSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='VibrationSensor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceId', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='temperaturemsg',
            name='temperatureSensor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sensor.TemperatureSensor'),
        ),
    ]
