# Generated by Django 5.2.7 on 2026-02-03 13:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='EducationalLevel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_en', models.CharField(max_length=100, verbose_name='Name (English)')),
                ('name_ar', models.CharField(max_length=100, verbose_name='Name (Arabic)')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_en', models.CharField(max_length=200, verbose_name='Name (English)')),
                ('name_ar', models.CharField(max_length=200, verbose_name='Name (Arabic)')),
                ('description_en', models.TextField(blank=True, verbose_name='Description (English)')),
                ('description_ar', models.TextField(blank=True, verbose_name='Description (Arabic)')),
                ('price', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, verbose_name='Price')),
                ('image', models.ImageField(blank=True, null=True, upload_to='subjects/', verbose_name='Image')),
                ('google_drive_link', models.URLField(blank=True, verbose_name='Google Drive Link')),
                ('google_meet_link', models.URLField(blank=True, verbose_name='Google Meet Link')),
                ('level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subjects', to='core.educationallevel')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_number', models.CharField(blank=True, max_length=20, verbose_name='Phone Number')),
                ('level', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='students', to='core.educationallevel')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='student_profile', to=settings.AUTH_USER_MODEL)),
                ('subscribed_subjects', models.ManyToManyField(blank=True, related_name='subscribers', to='core.subject')),
            ],
        ),
        migrations.CreateModel(
            name='Resource',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title_en', models.CharField(max_length=200, verbose_name='Title (English)')),
                ('title_ar', models.CharField(max_length=200, verbose_name='Title (Arabic)')),
                ('file', models.FileField(blank=True, null=True, upload_to='resources/', verbose_name='File')),
                ('link', models.URLField(blank=True, verbose_name='External Link')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resources', to='core.subject')),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bio', models.TextField(blank=True, verbose_name='Bio')),
                ('avatar', models.ImageField(blank=True, null=True, upload_to='teachers/', verbose_name='Avatar')),
                ('specialization', models.CharField(blank=True, max_length=255, verbose_name='Specialization')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='teacher_profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='subject',
            name='teacher',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subjects', to='core.teacher'),
        ),
    ]
