# Generated by Django 5.2.13 on 2026-05-16 14:23

# Standard Library
import uuid

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("eve_sde", "0018_blueprintactivity_blueprintactivityproduct_and_more"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="General",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
            ],
            options={
                "permissions": (
                    ("basic_access", "Can access this app, Belt Radar"),
                    ("manage_access", "Can manage Belt Radar"),
                    ("admin_access", "Admin access to Belt Radar"),
                ),
                "managed": False,
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="BeltSurveySession",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "public_id",
                    models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
                ),
                ("name", models.CharField(blank=True, max_length=150, null=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "owner",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="br_user_sessions",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="BeltSurveyEntry",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("snapshot", models.CharField(blank=True, max_length=64, null=True)),
                ("timestamp", models.DateTimeField(default=django.utils.timezone.now)),
                ("units", models.IntegerField(blank=True, null=True)),
                ("volume_left", models.FloatField(blank=True, null=True)),
                ("note", models.TextField(blank=True, null=True)),
                ("price_compressed", models.FloatField(blank=True, null=True)),
                ("price", models.FloatField(blank=True, null=True)),
                (
                    "eve_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="br_survey_entries",
                        to="eve_sde.itemtype",
                    ),
                ),
                (
                    "recorded_by",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "session",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="br_entries",
                        to="beltradar.beltsurveysession",
                    ),
                ),
            ],
            options={
                "ordering": ["timestamp"],
                "default_permissions": (),
            },
        ),
    ]
