# Generated by Django 3.2.16 on 2022-10-27 04:33

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.CharField(max_length=150, primary_key=True, serialize=False)),
                ('email', models.EmailField(max_length=254, verbose_name='email address')),
                ('username', models.CharField(max_length=150, verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
            ],
            options={
                'verbose_name': 'User',
                'verbose_name_plural': 'Users',
                'db_table': 'user_keycload',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Realm',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.CharField(help_text='Url as known on the Keycloak server. This url is used in the API paths of this Realm.', max_length=255)),
                ('name', models.CharField(help_text='Name as known on the Keycloak server. This name is used in the API paths of this Realm.', max_length=255, unique=True)),
                ('client_id', models.CharField(help_text='Client id as known on the Keycloak server. This name is used in the API paths of this Realm.', max_length=255)),
                ('secret', models.CharField(help_text='Secret of client id on the Keycloak server.', max_length=255)),
                ('username_or_email', models.CharField(help_text='User of client id on the Keycloak server.', max_length=255)),
                ('password', models.CharField(help_text='Password of user on the Keycloak server.', max_length=255)),
            ],
            options={
                'verbose_name': 'Realm',
                'verbose_name_plural': 'Realms',
                'db_table': 'realm',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('client_id', models.CharField(max_length=255)),
                ('realm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client', to='django_keycloak.realm')),
            ],
            options={
                'verbose_name': 'Realm Client',
                'verbose_name_plural': 'Realm Clients',
                'db_table': 'realm_client',
                'managed': True,
            },
        ),
    ]
