# Generated by Django 5.2.7 on 2026-05-09 22:53

import django.db.models.deletion
import noita.models
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

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

    operations = [
        migrations.CreateModel(
            name="Submission",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "content_type",
                    models.CharField(help_text="MIME type of the file", max_length=100),
                ),
                (
                    "file_size",
                    models.PositiveIntegerField(help_text="File size in bytes"),
                ),
                (
                    "file",
                    models.FileField(
                        help_text="Uploaded file (image/gif)",
                        upload_to=noita.models.submission_file_upload_path,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("processed", models.BooleanField(default=False)),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        help_text="User who made the submission (null for anonymous)",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="noita_submissions",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
    ]
