# Generated manually for MentorshipRequest

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0005_add_mentor_ai_trust_settings'),
    ]

    operations = [
        migrations.CreateModel(
            name='MentorshipRequest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(
                    choices=[
                        ('pending', 'Ожидает ответа'),
                        ('accepted', 'Принято'),
                        ('rejected', 'Отклонено'),
                    ],
                    db_index=True,
                    default='pending',
                    max_length=20,
                    verbose_name='Статус',
                )),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Дата обновления')),
                ('mentor', models.ForeignKey(
                    limit_choices_to={'role': 'mentor'},
                    on_delete=django.db.models.deletion.CASCADE,
                    related_name='mentorship_requests_received',
                    to=settings.AUTH_USER_MODEL,
                    verbose_name='Ментор',
                )),
                ('student', models.ForeignKey(
                    limit_choices_to={'role': 'client'},
                    on_delete=django.db.models.deletion.CASCADE,
                    related_name='mentorship_requests_sent',
                    to=settings.AUTH_USER_MODEL,
                    verbose_name='Студент',
                )),
            ],
            options={
                'verbose_name': 'Запрос на менторство',
                'verbose_name_plural': 'Запросы на менторство',
                'db_table': 'mentorship_requests',
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddIndex(
            model_name='mentorshiprequest',
            index=models.Index(fields=['mentor', 'status'], name='ment_req_mentor_status_idx'),
        ),
        migrations.AddIndex(
            model_name='mentorshiprequest',
            index=models.Index(fields=['student', 'status'], name='ment_req_student_status_idx'),
        ),
    ]
