# Generated by Django 3.0.7 on 2020-06-13 00:44

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),
    ]

    operations = [
        migrations.CreateModel(
            name='ImpostorLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('impostor_ip', models.GenericIPAddressField(blank=True, null=True,
                                                             verbose_name="Impostor's IP address")
                 ),
                ('logged_in', models.DateTimeField(auto_now_add=True, verbose_name='Logged on')),
                ('logged_out', models.DateTimeField(blank=True, null=True, verbose_name='Logged out')),
                ('token', models.CharField(blank=True, db_index=True, max_length=32, verbose_name='Token')),
                ('imposted_as', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                                  related_name='imposted_as', to=settings.AUTH_USER_MODEL,
                                                  verbose_name='Logged in as')),
                ('impostor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                               related_name='impostor', to=settings.AUTH_USER_MODEL,
                                               verbose_name='Impostor')),
            ],
            options={
                'verbose_name': 'Impostor log',
                'verbose_name_plural': 'Impostor logs',
                'ordering': ('-logged_in', 'impostor'),
            },
        ),
    ]
