# Generated by Django 2.2.4 on 2020-05-25 06:13

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('smart', '__first__'),
        ('mosquito', '0011_auto_20190901_1020'),
    ]

    operations = [
        migrations.CreateModel(
            name='MosqPostStatistic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total', models.PositiveIntegerField(verbose_name='总数')),
                ('increment', models.IntegerField(verbose_name='增量')),
                ('date', models.DateField(unique=True, verbose_name='日期')),
            ],
            options={
                'verbose_name': '统计报表',
                'verbose_name_plural': '统计报表',
            },
        ),
        migrations.CreateModel(
            name='Mosquito',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='设备名称')),
                ('device_id', models.CharField(max_length=100, verbose_name='设备ID')),
                ('region', models.CharField(max_length=50, verbose_name='区域')),
            ],
            options={
                'verbose_name': '灭蚊灯',
                'verbose_name_plural': '灭蚊灯',
            },
        ),
        migrations.CreateModel(
            name='Org',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='组织名称')),
                ('code', models.CharField(max_length=10, verbose_name='组织代码')),
                ('desc', models.CharField(blank='True', max_length=100, verbose_name='描述')),
            ],
            options={
                'verbose_name': '客户组织',
                'verbose_name_plural': '客户组织',
            },
        ),
        migrations.CreateModel(
            name='MosqPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('led', models.PositiveIntegerField(verbose_name='灭蚊数')),
                ('energy', models.PositiveIntegerField(verbose_name='电量')),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('mosq', models.ForeignKey(on_delete='PROTECT', to='mosquito.Mosquito', verbose_name='灭蚊灯')),
                ('smart_push', models.ForeignKey(on_delete='PROTECT', to='smart.SmartPush')),
            ],
            options={
                'verbose_name': '灭蚊数据',
                'verbose_name_plural': '灭蚊数据',
            },
        ),
        migrations.CreateModel(
            name='DevicePostStatistic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_id', models.CharField(max_length=100, verbose_name='设备ID')),
                ('total', models.PositiveIntegerField(verbose_name='总数')),
                ('date', models.DateField(verbose_name='日期')),
                ('org', models.ForeignKey(on_delete='PROTECT', to='mosquito.Org', verbose_name='所在组织')),
            ],
            options={
                'verbose_name': '设备日志统计表',
                'verbose_name_plural': '设备日志统计表',
            },
        ),
        migrations.CreateModel(
            name='DeviceInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_id', models.CharField(max_length=100, unique=True, verbose_name='设备ID')),
                ('org', models.ForeignKey(on_delete='PROTECT', to='mosquito.Org', verbose_name='所在组织')),
            ],
            options={
                'verbose_name': '灭蚊灯设备',
                'verbose_name_plural': '灭蚊灯设备',
            },
        ),
    ]
