# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-27 04:22
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('access', '0014_auto_20160228_2223'),
    ]

    operations = [
        migrations.CreateModel(
            name='Acesso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('etiqueta', models.CharField(max_length=12)),
                ('acesso', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Ambiente',
            fields=[
                ('fechadura', models.IntegerField(primary_key=True, serialize=False)),
                ('ambiente', models.CharField(max_length=150)),
                ('descri', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('evento', models.AutoField(primary_key=True, serialize=False)),
                ('fechadura', models.IntegerField()),
                ('etiqueta', models.CharField(max_length=12)),
                ('ocorrencia', models.DateTimeField(auto_now_add=True)),
                ('comando', models.IntegerField()),
                ('descri', models.CharField(choices=[(b'Acesso liberado', b'Liberado'), (b'Acesso Negado', b'Negado')], default=b'Acesso Negado', max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Zona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('etiqueta', models.CharField(max_length=12)),
                ('acesso', models.DateTimeField(auto_now_add=True)),
                ('fechadura', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='access.Ambiente')),
            ],
        ),
        migrations.DeleteModel(
            name='Message',
        ),
        migrations.RemoveField(
            model_name='telegram',
            name='user',
        ),
        migrations.AlterField(
            model_name='device',
            name='kind',
            field=models.CharField(choices=[(b'tag', b'TAG')], default=b'tag', max_length=3),
        ),
        migrations.DeleteModel(
            name='Telegram',
        ),
        migrations.AlterUniqueTogether(
            name='ambiente',
            unique_together=set([('fechadura',)]),
        ),
        migrations.AddField(
            model_name='acesso',
            name='ambiente',
            field=models.ManyToManyField(to='access.Ambiente'),
        ),
    ]
