# Generated by Django 2.2 on 2019-04-04 18:39

import actuator.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('device', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Actuator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('actuator_id', models.UUIDField(default=uuid.uuid4, help_text='Unique UUID of the actuator', unique=True)),
                ('name', models.CharField(default=actuator.models.defaultName, help_text='Unique display name of the actuator', max_length=30, unique=True)),
                ('schema', jsonfield.fields.JSONField(blank=True, help_text='Schema of the actuator', null=True)),
                ('profile', models.CharField(default='N/A', help_text='Profile of the actuator, set from the profile', max_length=60)),
                ('device', models.ForeignKey(blank=True, default=None, help_text='Device the actuator is located on', null=True, on_delete=django.db.models.deletion.CASCADE, to='device.Device')),
            ],
        ),
        migrations.CreateModel(
            name='ActuatorProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Unique name of the group', max_length=80, unique=True)),
                ('actuators', models.ManyToManyField(blank=True, help_text='Actuators of the groups profile', to='actuator.Actuator')),
            ],
            options={
                'verbose_name': 'profile',
                'verbose_name_plural': 'profiles',
            },
        ),
        migrations.CreateModel(
            name='ActuatorGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Unique name of the group', max_length=80, unique=True)),
                ('actuators', models.ManyToManyField(blank=True, help_text='Actuators available to users in the group', to='actuator.Actuator')),
                ('users', models.ManyToManyField(blank=True, help_text='Users in the group', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'group',
                'verbose_name_plural': 'groups',
            },
        ),
    ]
