# Generated by Django 2.1.2 on 2018-11-06 19:36

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Data',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.CharField(max_length=10)),
                ('date', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='DataStream',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('min', models.IntegerField(null=True)),
                ('max', models.IntegerField(null=True)),
                ('qos', models.IntegerField(default=0)),
                ('unit', models.CharField(max_length=32)),
                ('unit_symbol', models.CharField(max_length=32)),
                ('data', models.ManyToManyField(to='website.Data')),
            ],
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_id', models.IntegerField(unique=True)),
                ('device_key', models.CharField(max_length=32, null=True)),
                ('device_name', models.CharField(max_length=32)),
                ('dev_status', models.BooleanField(default=0)),
                ('dev_stream', models.ManyToManyField(to='website.DataStream')),
            ],
        ),
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(db_index=True, max_length=32, unique=True)),
                ('user_id', models.IntegerField(db_index=True, unique=True)),
                ('password', models.CharField(max_length=64)),
                ('weixin_id', models.CharField(db_index=True, max_length=64, null=True)),
                ('sex', models.CharField(max_length=16, null=True)),
                ('birthday', models.CharField(max_length=64, null=True)),
                ('tel', models.CharField(max_length=64, null=True)),
                ('email', models.CharField(max_length=64, null=True)),
                ('address', models.CharField(max_length=64, null=True)),
                ('introduction', models.CharField(max_length=255, null=True)),
                ('token', models.CharField(max_length=255, null=True)),
                ('device', models.ManyToManyField(to='website.Device')),
            ],
        ),
    ]
