# Generated by Django 5.0.2 on 2025-06-10 20:05

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


class Migration(migrations.Migration):

    dependencies = [
        ('schedule', '0002_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='lesson',
            options={'ordering': ['date', 'start_time'], 'verbose_name': 'Занятие', 'verbose_name_plural': 'Занятия'},
        ),
        migrations.RemoveField(
            model_name='lesson',
            name='lesson_type',
        ),
        migrations.AddField(
            model_name='lesson',
            name='date',
            field=models.DateField(default=django.utils.timezone.now),
        ),
        migrations.AddField(
            model_name='lesson',
            name='enrolled_students',
            field=models.ManyToManyField(blank=True, related_name='enrolled_lessons', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='lesson',
            name='location',
            field=models.CharField(default='Учебный класс', max_length=200),
        ),
        migrations.AlterField(
            model_name='lesson',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to='schedule.course'),
        ),
        migrations.AlterField(
            model_name='lesson',
            name='instructor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='lesson',
            name='start_time',
            field=models.TimeField(),
        ),
    ]
