# Generated by Django 5.2.4 on 2025-07-15 20:43

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='LogEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
                ('level', models.CharField(choices=[('DEBUG', 'Debug'), ('INFO', 'Info'), ('WARNING', 'Warning'), ('ERROR', 'Error'), ('CRITICAL', 'Critical')], max_length=10)),
                ('message', models.TextField()),
                ('module', models.CharField(max_length=255)),
                ('function', models.CharField(max_length=255)),
                ('line_number', models.IntegerField()),
                ('user_id', models.IntegerField(blank=True, null=True)),
                ('request_id', models.CharField(blank=True, max_length=255, null=True)),
                ('extra_data', models.JSONField(blank=True, default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'Log Entry',
                'verbose_name_plural': 'Log Entries',
                'ordering': ['-timestamp'],
                'indexes': [models.Index(fields=['timestamp'], name='logq_logent_timesta_9e2e5a_idx'), models.Index(fields=['level'], name='logq_logent_level_fa122c_idx'), models.Index(fields=['module'], name='logq_logent_module_f632bb_idx'), models.Index(fields=['function'], name='logq_logent_functio_433e61_idx'), models.Index(fields=['line_number'], name='logq_logent_line_nu_bd9370_idx'), models.Index(fields=['user_id'], name='logq_logent_user_id_651abc_idx'), models.Index(fields=['request_id'], name='logq_logent_request_eda96e_idx')],
            },
        ),
    ]
