# Generated by Django 5.2.16 on 2026-08-01 10:25

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0006_registrationrestrictionsetting_require_email_verification'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserActivity',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('guest_name', models.CharField(blank=True, max_length=150, null=True)),
                ('session_key', models.CharField(db_index=True, max_length=255)),
                ('ip_address', models.CharField(blank=True, default='', max_length=50)),
                ('user_agent', models.CharField(blank=True, default='', max_length=255)),
                ('last_path', models.CharField(blank=True, default='', max_length=255)),
                ('last_seen', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='activities', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Benutzer-Aktivität / Sitzung',
                'verbose_name_plural': 'Benutzer-Aktivitäten / Sitzungen',
                'ordering': ['-last_seen'],
            },
        ),
    ]
