# Generated by Django 2.2.1 on 2019-05-26 04:06

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Node',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nodeID', models.CharField(max_length=30)),
                ('descr', models.TextField(blank=True, null=True)),
                ('topic', models.CharField(blank=True, max_length=300, null=True)),
                ('status', models.CharField(default='X', help_text="'C' for current/online, 'X' for offline, 'M' for maintenance mode (no notifications)", max_length=1)),
                ('textStatus', models.CharField(blank=True, max_length=30, null=True)),
                ('is_gateway', models.BooleanField(default=False)),
                ('notification_sent', models.BooleanField(default=False)),
                ('lastseen', models.DateTimeField(blank=True, null=True)),
                ('status_sent', models.DateTimeField(blank=True, null=True)),
                ('next_update', models.DateTimeField(blank=True, null=True)),
                ('lastData', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_no', models.CharField(blank=True, max_length=30)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Setting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sKey', models.CharField(max_length=30)),
                ('sValue', models.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='UserNotify',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('send_email', models.BooleanField(default=False)),
                ('send_SMS', models.BooleanField(default=False)),
                ('node', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='monitor.Node')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='monitor.Profile')),
            ],
        ),
    ]
