# Generated by Django 2.1 on 2018-09-04 14:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cards',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identity', models.CharField(max_length=100, null=True, verbose_name='Kart Kimliği')),
                ('banned', models.BooleanField(default=False, help_text="<b style='color:red'>Dikkat sadece acil durumlarda işaretleyin</b>", verbose_name='Her Yerde Yasakla!')),
                ('is_visible', models.BooleanField(default=True, verbose_name='Aktif Mi?')),
                ('create_at', models.DateTimeField(auto_now_add=True, verbose_name='Oluşturulma Tarihi')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Güncellenme Tarihi')),
            ],
            options={
                'verbose_name': 'Kart',
                'verbose_name_plural': '03 - Kartlar',
            },
        ),
        migrations.CreateModel(
            name='Doors',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=300, unique=True, verbose_name='Kapı İsmi')),
                ('is_visible', models.BooleanField(default=True, verbose_name='Aktif Mi?')),
                ('create_at', models.DateTimeField(auto_now_add=True, verbose_name='Oluşturulma Tarihi')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Güncellenme Tarihi')),
            ],
            options={
                'verbose_name': 'Kapı',
                'verbose_name_plural': '01 - Kapılar',
            },
        ),
        migrations.CreateModel(
            name='Logs',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(null=True, verbose_name='Geçiş İzni')),
                ('message', models.CharField(blank=True, max_length=100, null=True, verbose_name='Mesaj')),
                ('reason', models.CharField(blank=True, max_length=100, null=True, verbose_name='Sebep')),
                ('create_at', models.DateTimeField(auto_now_add=True, verbose_name='Oluşturulma Tarihi')),
                ('card', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='iot_smart_door.Cards', verbose_name='Kart')),
                ('door', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='iot_smart_door.Doors', verbose_name='Kapı')),
            ],
            options={
                'verbose_name': 'Kayıt',
                'verbose_name_plural': '04 - Kayıtlar',
            },
        ),
        migrations.CreateModel(
            name='Personnels',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=50, null=True, verbose_name='İsim')),
                ('last_name', models.CharField(max_length=50, null=True, verbose_name='Soyisim')),
                ('email', models.CharField(blank=True, max_length=50, null=True, verbose_name='E-mail')),
                ('phone_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='Telefon Numarası')),
                ('is_visible', models.BooleanField(default=True, verbose_name='Aktif Mi?')),
                ('create_at', models.DateTimeField(auto_now_add=True, verbose_name='Oluşturulma Tarihi')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Güncellenme Tarihi')),
            ],
            options={
                'verbose_name': 'Kullanıcı',
                'verbose_name_plural': '02 - Kullanıcılar',
            },
        ),
        migrations.AddField(
            model_name='logs',
            name='personnel',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='iot_smart_door.Personnels', verbose_name='Personel'),
        ),
        migrations.AddField(
            model_name='cards',
            name='authorized_doors',
            field=models.ManyToManyField(blank=True, related_name='_cards_authorized_doors_+', to='iot_smart_door.Doors', verbose_name='İzinli Kapılar'),
        ),
        migrations.AddField(
            model_name='cards',
            name='banned_doors',
            field=models.ManyToManyField(blank=True, related_name='_cards_banned_doors_+', to='iot_smart_door.Doors', verbose_name='Yasaklı Kapılar'),
        ),
        migrations.AddField(
            model_name='cards',
            name='personnel',
            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, to='iot_smart_door.Personnels', verbose_name='Kullanıcı'),
        ),
        migrations.AddField(
            model_name='cards',
            name='unauthorized_doors',
            field=models.ManyToManyField(blank=True, related_name='_cards_unauthorized_doors_+', to='iot_smart_door.Doors', verbose_name='İzinsiz Kapılar'),
        ),
    ]
