# Generated by Django 4.2.4 on 2023-08-26 02:18

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='Login',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.GenericIPAddressField(db_index=True)),
                ('ip_info', models.JSONField(default=dict)),
                ('city', models.CharField(blank=True, max_length=80)),
                ('region', models.CharField(blank=True, max_length=80)),
                ('region_code', models.CharField(blank=True, max_length=10)),
                ('country_code', models.CharField(blank=True, max_length=2)),
                ('country_name', models.CharField(blank=True, max_length=80)),
                ('currency', models.CharField(blank=True, max_length=5)),
                ('user_agent', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
