# Generated by Django 3.1.5 on 2021-10-15 11:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('idp_user_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('email', models.CharField(max_length=100)),
                ('username', models.CharField(max_length=100, unique=True)),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='UserRole',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(max_length=125)),
                ('app_config', models.JSONField(null=True)),
                ('permission_restrictions', models.JSONField(default=dict)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_roles', to='idp_user.user')),
            ],
            options={
                'unique_together': {('user', 'role')},
            },
        ),
    ]
