# Generated by Django 5.2.5 on 2025-08-07 08:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='VisitLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(verbose_name='Insertion Date')),
                ('raw_user_agent', models.TextField(verbose_name='User Agent')),
                ('ip_address', models.GenericIPAddressField(verbose_name='IP Address')),
                ('user_username', models.CharField(blank=True, max_length=255, null=True)),
                ('identifier', models.CharField(help_text='MD5 auto generated hash from log details', max_length=32, verbose_name='Hash Code')),
                ('path', models.CharField(max_length=255, verbose_name='Path')),
                ('user_instance', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_user_log', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Visit Log',
                'verbose_name_plural': 'Visit Logs',
            },
        ),
    ]
