# Generated by Django 2.0.6 on 2019-10-09 09:05

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('users', '0009_auto_20191009_0905'),
    ]

    operations = [
        migrations.CreateModel(
            name='License',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='LicenseType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='License name')),
                ('key', models.CharField(max_length=128)),
                ('active', models.BooleanField(default=False, verbose_name='License active')),
                ('description', models.TextField(default='', verbose_name='Description')),
                ('for_role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Role')),
            ],
        ),
        migrations.AddField(
            model_name='license',
            name='license_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registration.LicenseType'),
        ),
        migrations.AddField(
            model_name='license',
            name='licensee',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
