# Generated by Django 6.0.1 on 2026-01-29 14:42

import uuid

from django.conf import settings
from django.db import migrations, models
from django.utils import timezone


class Migration(migrations.Migration):
    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('session_key', models.CharField(max_length=40)),
                ('user_agent', models.TextField()),
                ('expiry_date', models.DateTimeField()),
                ('location', models.JSONField(default=dict)),
                ('created_at', models.DateTimeField(default=timezone.now)),
                ('last_used', models.DateTimeField(default=timezone.now)),
                ('user', models.ForeignKey(on_delete=models.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'saas_user_session',
                'ordering': ('-last_used',),
                'unique_together': {('user', 'session_key')},
            },
        ),
    ]
