# Generated by Django 5.2.4 on 2025-09-27 00:49

import django.core.validators
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("pages", "0009_enable_awg_module"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="UserStory",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_user_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                ("path", models.CharField(max_length=500)),
                ("name", models.CharField(blank=True, max_length=40)),
                (
                    "rating",
                    models.PositiveSmallIntegerField(
                        help_text="Rate your experience from 1 (lowest) to 5 (highest).",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(5),
                        ],
                    ),
                ),
                (
                    "comments",
                    models.TextField(
                        help_text="Share more about your experience.",
                        validators=[django.core.validators.MaxLengthValidator(400)],
                    ),
                ),
                ("submitted_at", models.DateTimeField(auto_now_add=True)),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="user_stories",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "User Story",
                "verbose_name_plural": "User Stories",
                "ordering": ["-submitted_at"],
            },
        ),
    ]
