# Generated by Django 5.2.8 on 2025-12-06 15:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="TestResult",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "node_id",
                    models.CharField(
                        help_text="Full pytest node identifier", max_length=512
                    ),
                ),
                ("name", models.CharField(help_text="Short test name", max_length=255)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("passed", "Passed"),
                            ("failed", "Failed"),
                            ("skipped", "Skipped"),
                            ("error", "Error"),
                        ],
                        max_length=16,
                    ),
                ),
                (
                    "duration",
                    models.FloatField(
                        blank=True, help_text="Runtime in seconds", null=True
                    ),
                ),
                (
                    "log",
                    models.TextField(
                        blank=True, help_text="Captured output and failure details"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        default=django.utils.timezone.now, editable=False
                    ),
                ),
            ],
            options={
                "verbose_name": "Test result",
                "verbose_name_plural": "Test results",
                "ordering": ["-created_at", "node_id"],
            },
        ),
    ]
