# Generated by Django 2.2.10 on 2020-05-06 17:44

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


class Migration(migrations.Migration):

    dependencies = [
        ('majora2', '0075_auto_20200505_1806'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProfileAPIKeyDefinition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key_name', models.CharField(max_length=48)),
                ('is_service_key', models.BooleanField()),
                ('is_read_key', models.BooleanField()),
                ('is_write_key', models.BooleanField()),
                ('lifespan', models.DurationField()),
            ],
        ),
        migrations.CreateModel(
            name='ProfileAPIKey',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(default=uuid.uuid4, max_length=128)),
                ('validity_start', models.DateTimeField()),
                ('validity_end', models.DateTimeField()),
                ('key_definition', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='majora2.ProfileAPIKeyDefinition')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='majora2.Profile')),
            ],
        ),
    ]
