# Generated by Django 6.0.2 on 2026-02-07 20:31

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0023_session_pinned'),
    ]

    operations = [
        migrations.CreateModel(
            name='UsageSnapshot',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fetched_at', models.DateTimeField()),
                ('raw_response', models.JSONField()),
                ('five_hour_utilization', models.FloatField(blank=True, null=True)),
                ('five_hour_resets_at', models.DateTimeField(blank=True, null=True)),
                ('seven_day_utilization', models.FloatField(blank=True, null=True)),
                ('seven_day_resets_at', models.DateTimeField(blank=True, null=True)),
                ('seven_day_opus_utilization', models.FloatField(blank=True, null=True)),
                ('seven_day_opus_resets_at', models.DateTimeField(blank=True, null=True)),
                ('seven_day_sonnet_utilization', models.FloatField(blank=True, null=True)),
                ('seven_day_sonnet_resets_at', models.DateTimeField(blank=True, null=True)),
                ('seven_day_oauth_apps_utilization', models.FloatField(blank=True, null=True)),
                ('seven_day_oauth_apps_resets_at', models.DateTimeField(blank=True, null=True)),
                ('seven_day_cowork_utilization', models.FloatField(blank=True, null=True)),
                ('seven_day_cowork_resets_at', models.DateTimeField(blank=True, null=True)),
                ('extra_usage_is_enabled', models.BooleanField(default=False)),
                ('extra_usage_monthly_limit', models.IntegerField(blank=True, null=True)),
                ('extra_usage_used_credits', models.FloatField(blank=True, null=True)),
                ('extra_usage_utilization', models.FloatField(blank=True, null=True)),
            ],
            options={
                'ordering': ['-fetched_at'],
                'indexes': [models.Index(fields=['-fetched_at'], name='idx_usage_snapshot_fetched')],
            },
        ),
    ]
