# Generated by Django 3.0.8 on 2020-07-25 01:34

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Chapters',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, default='chapName', null=True)),
                ('description', models.TextField(blank=True, default='test', null=True)),
                ('length', models.IntegerField(blank=True, default=1, null=True)),
                ('likes', models.IntegerField(blank=True, default=0, null=True)),
                ('reviews', models.IntegerField(blank=True, default=0, null=True)),
                ('bought', models.BooleanField(blank=True, default=False, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ChatRoom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('module_code', models.TextField(blank=True, default='test', null=True)),
                ('module_name', models.TextField(blank=True, default='test', null=True)),
                ('deccription', models.TextField(blank=True, default='Ohh Yesss', null=True)),
                ('thumbnail', models.ImageField(blank=True, default='test', null=True, upload_to='media/coursethumbnail')),
                ('faculty', models.TextField(blank=True, default='test', null=True)),
                ('university', models.TextField(blank=True, default='test', null=True)),
                ('enrolled_students_number', models.IntegerField(blank=True, default=0, null=True)),
                ('certified', models.BooleanField(blank=True, default=False, null=True)),
                ('level', models.IntegerField(blank=True, default=2, null=True)),
                ('paid', models.BooleanField(blank=True, default=True, null=True)),
                ('introduction_vid', models.FileField(blank=True, default='tes', null=True, upload_to='media/CourseResources')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.TextField(blank=True, default='ok', null=True)),
                ('file', models.FileField(blank=True, null=True, upload_to='media/chatroomQuestions')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='question_user', to=settings.AUTH_USER_MODEL)),
                ('chapter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Qchapters', to='University.Chapters')),
                ('chatroom', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='University.ChatRoom')),
            ],
        ),
        migrations.CreateModel(
            name='Responses',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.TextField(blank=True, default='ok', null=True)),
                ('file', models.FileField(blank=True, default='des', null=True, upload_to='media/chatroomResponses')),
                ('votes', models.IntegerField(blank=True, default=0, null=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='response_user', to=settings.AUTH_USER_MODEL)),
                ('question', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='University.Question')),
            ],
        ),
        migrations.CreateModel(
            name='TutorProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, default='test', null=True)),
                ('surname', models.TextField(blank=True, default='test', null=True)),
                ('profilepicture', models.ImageField(blank=True, default='test', null=True, upload_to='media/tutorProfile')),
                ('year_of_study', models.IntegerField(blank=True, default=1, null=True)),
                ('varsity_college', models.TextField(blank=True, default='test', null=True)),
                ('faculty', models.TextField(blank=True, default='test', null=True)),
                ('qualification', models.TextField(blank=True, default='test', null=True)),
                ('cell_number', models.TextField(blank=True, default='test', null=True)),
                ('approved', models.BooleanField(blank=True, default=False, null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='tut_user', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='StudentProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, default='test', null=True)),
                ('surname', models.TextField(blank=True, default='test', null=True)),
                ('profilepicture', models.ImageField(blank=True, default='test', null=True, upload_to='media/studentprofile')),
                ('year_of_study', models.IntegerField(blank=True, default=1, null=True)),
                ('varsity_college', models.TextField(blank=True, default='test', null=True)),
                ('faculty', models.TextField(blank=True, default='test', null=True)),
                ('qualification', models.TextField(blank=True, default='test', null=True)),
                ('cell_number', models.TextField(blank=True, default='test', null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='stu_user', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ResponseVotes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('response', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='vote_response', to='University.Responses')),
                ('voter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='voter_name', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LoveChapter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('chapter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='loved_chapter', to='University.Chapters')),
                ('lover', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lover_name', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Enrolled',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('chapter', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='enrolled_chapter', to='University.Chapters')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='enrolled_module', to='University.Course')),
                ('student', models.ManyToManyField(related_name='enrolled_stu', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='tutor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tutor', to='University.TutorProfile'),
        ),
        migrations.CreateModel(
            name='Contents',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content_file', models.FileField(blank=True, default='tes', null=True, upload_to='media/CourseResources')),
                ('name', models.TextField(blank=True, default='computing', null=True)),
                ('content_type', models.TextField(blank=True, default='mp4', null=True)),
                ('chapter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cont_chapter', to='University.Chapters')),
                ('tutor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tutor_contents', to='University.TutorProfile')),
            ],
        ),
        migrations.AddField(
            model_name='chatroom',
            name='course',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='chat_course', to='University.Course'),
        ),
        migrations.AddField(
            model_name='chatroom',
            name='tutor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chat_tutor', to='University.TutorProfile'),
        ),
        migrations.AddField(
            model_name='chapters',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course', to='University.Course'),
        ),
        migrations.AddField(
            model_name='chapters',
            name='tutor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tutor_chapters', to='University.TutorProfile'),
        ),
        migrations.CreateModel(
            name='ChapterComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.TextField(blank=True, null=True)),
                ('chapter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_course', to='University.Chapters')),
                ('commenter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_author', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
