# Generated by Django 5.0 on 2026-07-30

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="ConsultationRequest",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100, verbose_name="Имя ученика")),
                (
                    "phone",
                    models.CharField(
                        max_length=30,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Введите телефон в привычном формате.",
                                regex="^[0-9+()\\-\\s]{7,30}$",
                            )
                        ],
                        verbose_name="Телефон",
                    ),
                ),
                (
                    "contact",
                    models.CharField(
                        blank=True,
                        max_length=100,
                        verbose_name="Telegram или другой способ связи",
                    ),
                ),
                (
                    "subject",
                    models.CharField(
                        choices=[("physics", "Физика"), ("mathematics", "Математика")],
                        max_length=20,
                        verbose_name="Предмет",
                    ),
                ),
                (
                    "exam",
                    models.CharField(
                        choices=[
                            ("oge", "ОГЭ"),
                            ("ege", "ЕГЭ"),
                            ("other", "Другая консультация"),
                        ],
                        max_length=20,
                        verbose_name="Цель подготовки",
                    ),
                ),
                ("preferred_date", models.DateField(verbose_name="Желаемая дата")),
                ("preferred_time", models.TimeField(verbose_name="Желаемое время")),
                (
                    "comment",
                    models.TextField(blank=True, max_length=1000, verbose_name="Комментарий"),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="Создана")),
                (
                    "is_processed",
                    models.BooleanField(default=False, verbose_name="Заявка обработана"),
                ),
            ],
            options={
                "verbose_name": "Заявка на консультацию",
                "verbose_name_plural": "Заявки на консультации",
                "ordering": ("is_processed", "preferred_date", "preferred_time"),
            },
        ),
    ]

