# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-27 18:29
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0004_rfid'),
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('identifier', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, verbose_name='Device name')),
                ('description', models.CharField(blank=True, max_length=255, verbose_name='Short description of what the device does')),
                ('added_date', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='DeviceAuth',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rfid.Device')),
                ('rfid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Rfid')),
            ],
        ),
        migrations.AddField(
            model_name='device',
            name='members',
            field=models.ManyToManyField(through='rfid.DeviceAuth', to='users.Rfid'),
        ),
    ]
