# Generated by Django 3.2.7 on 2022-04-14 04:19

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='Name')),
                ('base_url', models.URLField(verbose_name='Base url')),
                ('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
                ('token', models.CharField(default=django_sso.gate.models.service_token_generator, max_length=256, unique=True, verbose_name='Token')),
            ],
            options={
                'verbose_name': 'External service',
                'verbose_name_plural': 'External services',
            },
        ),
        migrations.CreateModel(
            name='AuthenticationRequest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
                ('token', models.CharField(default=django_sso.gate.models.auth_token_generator, max_length=128, unique=True, verbose_name='Token')),
                ('user_identy', models.CharField(help_text='E-Mail, login, etc.', max_length=128, verbose_name='User identy')),
                ('used', models.BooleanField(default=False, verbose_name='Are used in external service')),
                ('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gate.service', verbose_name='Service')),
            ],
            options={
                'verbose_name': 'Authentication request',
                'verbose_name_plural': 'Authentication requests',
            },
        ),
    ]
