# Generated by Django 3.0.8 on 2020-09-05 19:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BrowserSession',
            fields=[
                ('token', models.UUIDField(primary_key=True, serialize=False, unique=True)),
                ('ip', models.GenericIPAddressField()),
                ('agent', models.TextField()),
                ('browser', models.CharField(max_length=50, null=True)),
                ('device', models.CharField(max_length=50, null=True)),
                ('start_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='PageSession',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('page', models.TextField()),
                ('new_to_website', models.BooleanField(default=None, null=True)),
                ('referer', models.TextField(null=True)),
                ('request_time', models.DateTimeField(auto_now_add=True)),
                ('last_viewed', models.BooleanField(default=True)),
                ('browser_session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stats_dashboard.BrowserSession')),
            ],
        ),
        migrations.CreateModel(
            name='PageEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=50)),
                ('info', models.CharField(max_length=50)),
                ('page_session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stats_dashboard.PageSession')),
            ],
        ),
    ]
