# Generated by Django 2.0.8 on 2018-09-23 11:21

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
import uuid


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('django_freeradius', '0001_initial_freeradius'),
    ]

    operations = [
        migrations.CreateModel(
            name='RadiusBatch',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(db_index=True, help_text='A unique batch name', max_length=128, unique=True, verbose_name='name')),
                ('strategy', models.CharField(choices=[('prefix', 'Generate from prefix'), ('csv', 'Import from CSV')], db_index=True, help_text='Import users from a CSV or generate using a prefix', max_length=16, verbose_name='strategy')),
                ('csvfile', models.FileField(blank=True, help_text='The csv file containing the user details to be uploaded', null=True, upload_to='', verbose_name='CSV')),
                ('prefix', models.CharField(blank=True, help_text='Usernames generated will be of the format [prefix][number]', max_length=20, null=True, verbose_name='prefix')),
                ('pdf', models.FileField(blank=True, help_text='The pdf file containing list of usernames and passwords', null=True, upload_to='', verbose_name='PDF')),
                ('expiration_date', models.DateField(blank=True, help_text='If left blank users will never expire', null=True, verbose_name='expiration date')),
                ('users', models.ManyToManyField(blank=True, help_text='List of users uploaded in this batch', related_name='radius_batch', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'radbatch',
                'verbose_name': 'batch user creation',
                'swappable': 'DJANGO_FREERADIUS_RADIUSBATCH_MODEL',
                'verbose_name_plural': 'batch user creation operations',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='RadiusGroup',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(db_index=True, max_length=255, unique=True, verbose_name='group name')),
                ('description', models.CharField(blank=True, max_length=64, null=True, verbose_name='description')),
                ('default', models.BooleanField(default=False, help_text='The default group is automatically assigned to new users; changing the default group has only effect on new users (existing users will keep being members of their current group)', verbose_name='is default?')),
            ],
            options={
                'swappable': 'DJANGO_FREERADIUS_RADIUSGROUP_MODEL',
                'verbose_name': 'group',
                'abstract': False,
                'verbose_name_plural': 'groups',
            },
        ),
        migrations.AddField(
            model_name='radiuscheck',
            name='is_active',
            field=models.BooleanField(default=True),
        ),
        migrations.AddField(
            model_name='radiuscheck',
            name='notes',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='radiuscheck',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='radiuscheck',
            name='valid_until',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='radiusgroupcheck',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.DJANGO_FREERADIUS_RADIUSGROUP_MODEL),
        ),
        migrations.AddField(
            model_name='radiusgroupreply',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.DJANGO_FREERADIUS_RADIUSGROUP_MODEL),
        ),
        migrations.AddField(
            model_name='radiusreply',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='radiususergroup',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.DJANGO_FREERADIUS_RADIUSGROUP_MODEL),
        ),
        migrations.AddField(
            model_name='radiususergroup',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='radiusaccounting',
            name='called_station_id',
            field=models.CharField(blank=True, db_column='calledstationid', db_index=True, max_length=50, null=True, verbose_name='called station ID'),
        ),
        migrations.AlterField(
            model_name='radiusaccounting',
            name='calling_station_id',
            field=models.CharField(blank=True, db_column='callingstationid', db_index=True, max_length=50, null=True, verbose_name='calling station ID'),
        ),
        migrations.AlterField(
            model_name='radiuscheck',
            name='username',
            field=models.CharField(blank=True, db_index=True, max_length=64, verbose_name='username'),
        ),
        migrations.AlterField(
            model_name='radiusgroupcheck',
            name='groupname',
            field=models.CharField(blank=True, db_index=True, max_length=64, verbose_name='group name'),
        ),
        migrations.AlterField(
            model_name='radiusgroupreply',
            name='groupname',
            field=models.CharField(blank=True, db_index=True, max_length=64, verbose_name='group name'),
        ),
        migrations.AlterField(
            model_name='radiusreply',
            name='username',
            field=models.CharField(blank=True, db_index=True, max_length=64, verbose_name='username'),
        ),
        migrations.AlterField(
            model_name='radiususergroup',
            name='groupname',
            field=models.CharField(blank=True, max_length=64, verbose_name='group name'),
        ),
        migrations.AlterField(
            model_name='radiususergroup',
            name='username',
            field=models.CharField(blank=True, db_index=True, max_length=64, verbose_name='username'),
        ),
    ]
