# Generated by Django 5.1.3 on 2025-04-21 09:38

import core.models
import django.db.models.deletion
import django.utils.timezone
import phonenumber_field.modelfields
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='AcademicSession',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256, unique=True)),
                ('details', models.CharField(blank=True, max_length=2000, null=True)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-time_created'],
            },
        ),
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('content', models.TextField(null=True)),
                ('marks', models.DecimalField(decimal_places=1, max_digits=4, null=True)),
                ('submission_deadline', models.DateTimeField()),
                ('allow_attachment_submission', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=False)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='AttachmentContent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('file', models.FileField(max_length=256, upload_to=core.models.file_content_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Consultation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('preferred_time', models.CharField(max_length=100)),
                ('details', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='CourseModule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('is_active', models.BooleanField(default=False)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='EducationType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=50, null=True)),
                ('description', models.CharField(blank=True, max_length=1000, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='ElementContent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('content', models.TextField()),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='GradeClass',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=50, null=True)),
                ('description', models.CharField(blank=True, max_length=1000, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='GradeLevel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=50, null=True)),
                ('description', models.CharField(blank=True, max_length=1000, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='OnlineMeeting',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('client', models.CharField(max_length=32)),
                ('topic', models.CharField(max_length=512)),
                ('meeting_url', models.CharField(max_length=256, null=True)),
                ('meeting_id', models.CharField(max_length=128, null=True)),
                ('passcode', models.CharField(max_length=32, null=True)),
                ('start_time', models.DateTimeField()),
                ('duration', models.TextField(blank=True, null=True)),
                ('details', models.CharField(max_length=32)),
                ('is_active', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True, unique=True)),
                ('phone', models.CharField(blank=True, max_length=15, null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('website', models.URLField(blank=True, null=True)),
                ('logo', models.ImageField(blank=True, null=True, upload_to='organization_logos')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='PromoCode',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, max_length=100, null=True)),
                ('discount_amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('discount_type', models.CharField(choices=[('Fixed Amount', 'Fixed Amount'), ('Percentage', 'Percentage')], default='fixed', max_length=15)),
                ('valid_from', models.DateTimeField(blank=True, null=True)),
                ('valid_to', models.DateTimeField(blank=True, null=True)),
                ('total_count', models.IntegerField(blank=True, null=True)),
                ('taken_count', models.IntegerField(blank=True, null=True)),
                ('code_status', models.CharField(choices=[('Active', 'Active'), ('Inactive', 'Inactive')], default='Inactive', max_length=10)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=50, null=True)),
                ('description', models.CharField(blank=True, max_length=1000, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='SubjectGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=50, null=True)),
                ('description', models.CharField(blank=True, max_length=1000, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='AnnouncementPost',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('content', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
                ('is_edited', models.BooleanField(default=False)),
                ('is_published', models.BooleanField(default=False)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='announcements', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AnnouncementPostAttachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attachment', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.announcement_post_file_upload_path)),
                ('announcement_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='core.announcementpost')),
            ],
        ),
        migrations.CreateModel(
            name='AnnouncementPostViewCount',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('announcement_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='views', to='core.announcementpost')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='announcement_post_views', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AnnouncementUpvote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('announcement_post', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='announcement_upvotes', to='core.announcementpost')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='announcement_upvotes', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AssignmentAttachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(max_length=256, upload_to=core.models.assignment_attachment_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_attachments', to='core.assignment')),
            ],
        ),
        migrations.CreateModel(
            name='AssignmentSubmission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('marks_obtained', models.DecimalField(decimal_places=1, max_digits=4, null=True)),
                ('grader_comment', models.TextField(null=True)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_submissions', to='core.assignment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_submissions', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AssignmentSubmissionAttachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(max_length=256, upload_to=core.models.assignment_submission_attachment_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('assignment_submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_submission_attachments', to='core.assignmentsubmission')),
            ],
        ),
        migrations.CreateModel(
            name='AssignmentTimeExtension',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('requested_deadline', models.DateTimeField()),
                ('reason', models.TextField(null=True)),
                ('modified_requested_deadline', models.DateTimeField(null=True)),
                ('is_approved', models.BooleanField(null=True)),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_time_extensions', to='core.assignment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_time_extensions', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('assignment', 'user')},
            },
        ),
        migrations.CreateModel(
            name='AssignmentTimeExtensionAttachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(max_length=256, upload_to=core.models.assignment_time_extension_attachment_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('assignment_time_extension', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignment_time_extension_attachments', to='core.assignmenttimeextension')),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('details', models.TextField(blank=True, null=True)),
                ('duration', models.IntegerField()),
                ('rating', models.DecimalField(blank=True, decimal_places=1, max_digits=2, null=True)),
                ('is_active', models.BooleanField(default=False)),
                ('is_archived', models.BooleanField(default=False)),
                ('image', models.ImageField(blank=True, null=True, upload_to=core.models.course_image_upload_path)),
                ('course_week', models.TextField(null=True)),
                ('number_class', models.IntegerField(default=0)),
                ('student_limit', models.IntegerField(default=0)),
                ('country_fees', models.JSONField(blank=True, null=True)),
                ('start_date', models.DateField(blank=True, null=True)),
                ('end_date', models.DateField(blank=True, null=True)),
                ('group_discount', models.JSONField(blank=True, null=True)),
                ('syllabus', models.FileField(blank=True, null=True, upload_to=core.models.course_syllabus_upload_path)),
                ('is_one_to_one', models.BooleanField(default=False)),
                ('is_one_to_group', models.BooleanField(default=False)),
                ('is_one_to_many', models.BooleanField(default=False)),
                ('is_selfpaced', models.BooleanField(default=False)),
                ('is_organization', models.BooleanField(default=False)),
                ('study_method', models.CharField(blank=True, max_length=100, null=True)),
                ('assessments', models.CharField(blank=True, max_length=100, null=True)),
                ('entry_requirements', models.CharField(blank=True, max_length=100, null=True)),
                ('language', models.CharField(blank=True, max_length=100, null=True)),
                ('what_you_will_learn', models.TextField(blank=True, null=True)),
                ('topics_covered', models.TextField(blank=True, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('assessment_details', models.TextField(blank=True, null=True)),
                ('textbooks', models.TextField(blank=True, null=True)),
                ('regarding_requirements', models.TextField(blank=True, null=True)),
                ('about_study_loans', models.TextField(blank=True, null=True)),
                ('why_focus_on_one_subject', models.TextField(blank=True, null=True)),
                ('what_to_learn_next', models.TextField(blank=True, null=True)),
                ('faq', models.JSONField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('edited_at', models.DateTimeField(auto_now=True, null=True)),
                ('course_status', models.CharField(choices=[('Draft', 'Draft'), ('Pending', 'Pending'), ('Approved', 'Approved')], default='Pending', max_length=128)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='courses_created', to=settings.AUTH_USER_MODEL)),
                ('student', models.ManyToManyField(related_name='course', to=settings.AUTH_USER_MODEL)),
                ('education_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='courses', to='core.educationtype')),
                ('grade_class', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='courses', to='core.gradeclass')),
                ('grade_level', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='courses', to='core.gradelevel')),
            ],
            options={
                'ordering': ['created_at'],
            },
        ),
        migrations.AddField(
            model_name='announcementpost',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='announcements', to='core.course'),
        ),
        migrations.CreateModel(
            name='CourseContent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence', models.IntegerField(blank=True, null=True)),
                ('title', models.CharField(blank=True, max_length=350, null=True)),
                ('is_active', models.BooleanField(blank=True, default=False, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('edited_at', models.DateTimeField(auto_now=True, null=True)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='course_content', to='core.course')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='course_contents', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CourseContentDocument',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence', models.IntegerField(blank=True, null=True)),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=500, null=True, upload_to=core.models.selfpaced_content_upload_path)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('edited_at', models.DateTimeField(auto_now=True, null=True)),
                ('course_content', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document', to='core.coursecontent')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='course_content_document', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DiscussionPost',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('content', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
                ('is_edited', models.BooleanField(default=False)),
                ('is_published', models.BooleanField(default=False)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='discussion_posts', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DiscussionPostAttachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attachment', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.discussion_post_file_upload_path)),
                ('discussion_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='core.discussionpost')),
            ],
        ),
        migrations.CreateModel(
            name='DiscussionPostViewCount',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('discussion_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='views', to='core.discussionpost')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='discussion_post_views', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DiscussionReply',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
                ('is_edited', models.BooleanField(default=False)),
                ('is_deleted', models.BooleanField(default=False)),
                ('discussion_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='discussion_replies', to='core.discussionpost')),
                ('parent_reply', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='child_replies', to='core.discussionreply')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='discussion_replies', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DiscussionReplyAttachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attachment', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.discussion_reply_file_upload_path)),
                ('discussion_reply', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='core.discussionreply')),
            ],
        ),
        migrations.CreateModel(
            name='DiscussionUpvote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('discussion_post', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='discussion_upvotes', to='core.discussionpost')),
                ('discussion_reply', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='discussion_upvotes', to='core.discussionreply')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='discussion_upvotes', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Exam',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('instruction', models.CharField(max_length=4000)),
                ('start_time', models.DateTimeField(blank=True, null=True)),
                ('end_time', models.DateTimeField(blank=True, null=True)),
                ('duration', models.IntegerField()),
                ('total_marks', models.DecimalField(decimal_places=1, max_digits=4, null=True)),
                ('status', models.CharField(choices=[('Unpublished', 'Unpublished'), ('Published', 'Published'), ('Finished', 'Finished')], default='Unpublished', max_length=64)),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('is_enabled_all', models.BooleanField(default=False)),
                ('back_tracking', models.BooleanField(default=False)),
                ('added_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='exam', to=settings.AUTH_USER_MODEL)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='exam', to='core.course')),
            ],
        ),
        migrations.CreateModel(
            name='DescriptiveQ',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('q_text', models.CharField(max_length=10000)),
                ('marks', models.DecimalField(decimal_places=1, max_digits=3)),
                ('note', models.CharField(blank=True, max_length=1024, null=True)),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('exam', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='descriptive_q', to='core.exam')),
            ],
        ),
        migrations.CreateModel(
            name='ExamFeedback',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.exam_feedback_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='exam_feedback', to='core.course')),
                ('student', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='exam_feedback', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='GradeConfig',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(max_length=16)),
                ('start_point', models.IntegerField()),
                ('end_point', models.IntegerField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('edited_at', models.DateTimeField(auto_now=True)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='grade_configs', to='core.course')),
            ],
        ),
        migrations.CreateModel(
            name='Homework',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.homework_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('coursecontent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework', to='core.coursecontent')),
            ],
        ),
        migrations.CreateModel(
            name='HomeworkSubmission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.homework_submission_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('coursecontent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_submission', to='core.coursecontent')),
                ('student', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_submission', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='HomeworkSubComment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(blank=True, max_length=2048, null=True)),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('comment_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_sub_comment', to=settings.AUTH_USER_MODEL)),
                ('homeworksubmission', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_sub_comment', to='core.homeworksubmission')),
            ],
        ),
        migrations.CreateModel(
            name='HomeworkSubReview',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.homework_sub_review_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('coursecontent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_sub_review', to='core.coursecontent')),
                ('student', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_sub_review', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Instructor',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('occupation', models.CharField(blank=True, max_length=128, null=True)),
                ('details', models.CharField(blank=True, max_length=5000, null=True)),
                ('contact_email', models.EmailField(blank=True, max_length=254, null=True)),
                ('status', models.CharField(choices=[('Pending', 'Pending'), ('Active', 'Active'), ('Not Active', 'Not Active')], default='Pending', max_length=128)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('is_one_to_one', models.BooleanField(blank=True, default=False, null=True)),
                ('is_one_to_group', models.BooleanField(blank=True, default=False, null=True)),
                ('is_one_to_many', models.BooleanField(blank=True, default=False, null=True)),
                ('is_selfpaced', models.BooleanField(blank=True, default=False, null=True)),
                ('hourly_fee', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('city', models.CharField(blank=True, max_length=128, null=True)),
                ('language', models.CharField(blank=True, max_length=128, null=True)),
                ('wp_number', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, null=True, region=None)),
                ('skype_id', models.CharField(blank=True, max_length=128, null=True)),
                ('website', models.CharField(blank=True, max_length=500, null=True)),
                ('linked_in_id', models.CharField(blank=True, max_length=500, null=True)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='instructor', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='instructor',
            field=models.ManyToManyField(related_name='course', to='core.instructor'),
        ),
        migrations.CreateModel(
            name='InstructorDocuments',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('source_type', models.CharField(default='image', max_length=100)),
                ('file', models.FileField(upload_to=core.models.instructor_documents_upload_path)),
                ('thumbnail', models.ImageField(blank=True, null=True, upload_to='thumbnails/')),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('edited_at', models.DateTimeField(auto_now=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='instructor_documents_created', to=settings.AUTH_USER_MODEL)),
                ('instructor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='core.instructor')),
            ],
        ),
        migrations.CreateModel(
            name='InstructorHoldWeek',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('week', models.TextField()),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='instructor_hold_week', to='core.course')),
                ('instructor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='instructor_hold_week', to='core.instructor')),
            ],
        ),
        migrations.CreateModel(
            name='LectureNote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=256, null=True, upload_to=core.models.lecture_note_upload_path)),
                ('coursecontent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='lecturenote', to='core.coursecontent')),
            ],
        ),
        migrations.CreateModel(
            name='MCQ',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('q_text', models.CharField(max_length=512)),
                ('marks', models.DecimalField(decimal_places=1, max_digits=3)),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('exam', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='mcq', to='core.exam')),
            ],
        ),
        migrations.CreateModel(
            name='Choice',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=128)),
                ('correct', models.BooleanField(default=False)),
                ('mcq', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='choice', to='core.mcq')),
            ],
        ),
        migrations.CreateModel(
            name='ModuleContent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('Element', 'Element'), ('Video', 'Video'), ('Attachment', 'Attachment')], max_length=32)),
                ('is_active', models.BooleanField(default=False)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('attachment_content', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_content', to='core.attachmentcontent')),
                ('course_module', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_contents', to='core.coursemodule')),
                ('element_content', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_content', to='core.elementcontent')),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='ContentNote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='content_notes', to=settings.AUTH_USER_MODEL)),
                ('module_content', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='content_notes', to='core.modulecontent')),
            ],
        ),
        migrations.CreateModel(
            name='InstructorMeetingJoin',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('joined_at', models.DateTimeField(auto_now_add=True)),
                ('summary', models.TextField(blank=True, null=True)),
                ('instructor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='instructor_meeting_join', to='core.instructor')),
                ('live_class', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='instructors', to='core.onlinemeeting')),
            ],
        ),
        migrations.CreateModel(
            name='CoursePayment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('discounted_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('pay_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('no_of_subscriptions', models.IntegerField()),
                ('payment_type', models.CharField(blank=True, null=True)),
                ('tnx_id', models.CharField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('duration', models.IntegerField(blank=True, null=True)),
                ('course_type', models.CharField(blank=True, max_length=50, null=True)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_payment', to='core.course')),
                ('user', models.ManyToManyField(related_name='course_payment', to=settings.AUTH_USER_MODEL)),
                ('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='payment', to='core.organization')),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='organization',
            field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orgcourse', to='core.organization'),
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(blank=True, choices=[('MCQ', 'MCQ'), ('Descriptive', 'Descriptive')], max_length=16, null=True)),
                ('descriptive_q', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='question', to='core.descriptiveq')),
                ('exam', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='question', to='core.exam')),
                ('mcq', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='question', to='core.mcq')),
            ],
        ),
        migrations.CreateModel(
            name='StudentExam',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_finished', models.BooleanField(default=False)),
                ('started_at', models.DateTimeField(auto_now_add=True)),
                ('finished_at', models.DateTimeField(blank=True, null=True)),
                ('total_marks_obtained', models.DecimalField(decimal_places=1, max_digits=4, null=True)),
                ('is_graded', models.BooleanField(default=False)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('additonal_duration', models.IntegerField(blank=True, null=True)),
                ('exam', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='student_exam', to='core.exam')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='student_exam', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MCQAns',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('marks_obtained', models.DecimalField(decimal_places=1, max_digits=3, null=True)),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('choice', models.ManyToManyField(related_name='mcq_ans', to='core.choice')),
                ('mcq', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='mcq_ans', to='core.mcq')),
                ('student_exam', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='mcq_ans', to='core.studentexam')),
            ],
        ),
        migrations.CreateModel(
            name='DescriptiveQAns',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ans', models.CharField(blank=True, max_length=10000, null=True)),
                ('marks_obtained', models.DecimalField(decimal_places=1, max_digits=3, null=True)),
                ('feedback', models.CharField(blank=True, max_length=5000, null=True)),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('descriptive_q', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='descriptive_q_ans', to='core.descriptiveq')),
                ('student_exam', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='descriptive_q_ans', to='core.studentexam')),
            ],
        ),
        migrations.CreateModel(
            name='StudentMeetingJoin',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('joined_at', models.DateTimeField(auto_now_add=True)),
                ('live_class', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='students', to='core.onlinemeeting')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_meeting_join', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='subject',
            field=models.ManyToManyField(blank=True, related_name='courses', to='core.subject'),
        ),
        migrations.AddField(
            model_name='subject',
            name='subject_group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subjects', to='core.subjectgroup'),
        ),
        migrations.CreateModel(
            name='Testimonial',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('testimonial', models.CharField(blank=True, max_length=1024, null=True)),
                ('rating', models.IntegerField(blank=True, null=True)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='course_testimonial', to='core.course')),
                ('instructor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='course_instructor', to='core.instructor')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserApproval',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('approval_status', models.CharField(choices=[('Not Approved', 'Not Approved'), ('Approved', 'Approved'), ('On Hold', 'On Hold'), ('Rejected', 'Rejected')], default='Not Approved', max_length=128)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('user', models.OneToOneField(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserCourse',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('approval_status', models.CharField(choices=[('Pending', 'Pending'), ('Approved', 'Approved')], default='Pending', max_length=128)),
                ('rating', models.DecimalField(blank=True, decimal_places=1, max_digits=2, null=True)),
                ('hold_access', models.BooleanField(default=False)),
                ('name', models.CharField(blank=True, max_length=128, null=True)),
                ('duration', models.IntegerField(blank=True, null=True)),
                ('class_completed', models.IntegerField(blank=True, null=True)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_course', to='core.course')),
                ('instructor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_course', to='core.instructor')),
                ('students', models.ManyToManyField(related_name='user_course', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='onlinemeeting',
            name='usercourse',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='online_meeting', to='core.usercourse'),
        ),
        migrations.CreateModel(
            name='Notepad',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('note', models.TextField()),
                ('is_published', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='notepad', to=settings.AUTH_USER_MODEL)),
                ('usercourse', models.ForeignKey(default=False, on_delete=django.db.models.deletion.CASCADE, related_name='notepad', to='core.usercourse')),
            ],
        ),
        migrations.CreateModel(
            name='HoldWeek',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('week', models.TextField()),
                ('usercourse', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hold_week', to='core.usercourse')),
            ],
        ),
        migrations.AddField(
            model_name='elementcontent',
            name='usercourse',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='element_contents', to='core.usercourse'),
        ),
        migrations.AddField(
            model_name='discussionpost',
            name='usercourse',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='discussion_posts', to='core.usercourse'),
        ),
        migrations.AddField(
            model_name='coursemodule',
            name='usercourse',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='course_module', to='core.usercourse'),
        ),
        migrations.CreateModel(
            name='CourseMember',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('invite_to', models.EmailField(blank=True, max_length=254, null=True)),
                ('is_accept', models.BooleanField(default=False)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_members', to='core.course')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_memberships', to=settings.AUTH_USER_MODEL)),
                ('usercourse', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_course_memberships', to='core.usercourse')),
            ],
        ),
        migrations.AddField(
            model_name='attachmentcontent',
            name='usercourse',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='attachment_contents', to='core.usercourse'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='usercourse',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assignments', to='core.usercourse'),
        ),
        migrations.CreateModel(
            name='UserInformation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(choices=[('Admin', 'Admin'), ('OrgAdmin', 'OrgAdmin'), ('Instructor', 'Instructor'), ('Guardian', 'Guardian'), ('Student', 'Student')], default='Student', max_length=32)),
                ('phone_number', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, null=True, region=None)),
                ('image', models.ImageField(blank=True, null=True, upload_to=core.models.user_image_upload_path)),
                ('location', models.CharField(blank=True, max_length=32, null=True)),
                ('gender', models.CharField(blank=True, choices=[('Male', 'Male'), ('Female', 'Female'), ('Others', 'Others')], default='Male', max_length=32, null=True)),
                ('dob', models.DateField(blank=True, null=True)),
                ('parents_name', models.CharField(blank=True, max_length=100, null=True)),
                ('pin_code', models.CharField(blank=True, max_length=10, null=True)),
                ('time_zone', models.CharField(blank=True, max_length=64, null=True)),
                ('is_organization', models.BooleanField(default=False)),
                ('referal_code', models.CharField(blank=True, max_length=50, null=True)),
                ('profile_lock', models.CharField(blank=True, choices=[('incomplete', 'Incomplete'), ('waiting_approval', 'Waiting for Approval'), ('completed', 'Completed')], default='completed', max_length=32, null=True)),
                ('organization', models.OneToOneField(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orguser', to='core.organization')),
                ('user', models.OneToOneField(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='userinformation', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserLoginSession',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device', models.CharField(blank=True, max_length=128, null=True)),
                ('address', models.CharField(blank=True, max_length=256, null=True)),
                ('login_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('logout_time', models.DateTimeField(blank=True, null=True)),
                ('is_logged_in', models.BooleanField(default=False)),
                ('user', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence', models.IntegerField(blank=True, null=True)),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=500, null=True, upload_to=core.models.selfpaced_content_upload_path)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('edited_at', models.DateTimeField(auto_now=True, null=True)),
                ('course_content', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='video', to='core.coursecontent')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='course_content_video', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CourseContentResource',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence', models.IntegerField(blank=True, null=True)),
                ('title', models.CharField(blank=True, max_length=256, null=True)),
                ('file', models.FileField(blank=True, max_length=500, null=True, upload_to=core.models.selfpaced_resource_upload_path)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('edited_at', models.DateTimeField(auto_now=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='course_content_resource', to=settings.AUTH_USER_MODEL)),
                ('video', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='resource', to='core.video')),
            ],
        ),
        migrations.CreateModel(
            name='CourseContentProgress',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_completed', models.BooleanField(default=False)),
                ('coursecontent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='course_content_progress', to='core.coursecontent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_content_progress', to=settings.AUTH_USER_MODEL)),
                ('video', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='course_content_progress', to='core.video')),
            ],
        ),
        migrations.CreateModel(
            name='VideoContent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('file', models.FileField(max_length=256, upload_to=core.models.video_content_upload_path)),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('usercourse', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='video_contents', to='core.usercourse')),
            ],
        ),
        migrations.AddField(
            model_name='modulecontent',
            name='video_content',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='module_content', to='core.videocontent'),
        ),
        migrations.CreateModel(
            name='VideoPause',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('duration', models.FloatField(blank=True, null=True)),
                ('coursecontent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='video_pause', to='core.coursecontent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='video_pause', to=settings.AUTH_USER_MODEL)),
                ('video', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='video_pause', to='core.video')),
            ],
        ),
        migrations.CreateModel(
            name='VideoRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('thumbnail', models.FileField(blank=True, null=True, upload_to='')),
                ('video', models.FileField(blank=True, null=True, upload_to=core.models.recorded_video_file_upload_path)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='recorded_videos', to=settings.AUTH_USER_MODEL)),
                ('usercourse', models.ForeignKey(default=False, on_delete=django.db.models.deletion.CASCADE, related_name='video_record', to='core.usercourse')),
            ],
        ),
        migrations.CreateModel(
            name='CourseActivity',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_content_view', models.DateTimeField(null=True)),
                ('content_view_count', models.IntegerField(default=0)),
                ('last_participation', models.DateTimeField(null=True)),
                ('participation_count', models.IntegerField(default=0)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_activities', to='core.course')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_activities', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'constraints': [models.UniqueConstraint(fields=('course', 'user'), name='unique course_activity')],
            },
        ),
        migrations.CreateModel(
            name='ExamSchedule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.DateTimeField(blank=True, null=True)),
                ('end_time', models.DateTimeField(blank=True, null=True)),
                ('duration', models.IntegerField()),
                ('is_enabled', models.BooleanField(default=False)),
                ('exam', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='exam_schedule', to='core.exam')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='exam_schedule', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'constraints': [models.UniqueConstraint(fields=('exam', 'user'), name='unique exam_schedule')],
            },
        ),
        migrations.CreateModel(
            name='HomeworkSubNewComment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_seen', models.BooleanField(default=True)),
                ('homeworksubmission', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_sub_new_comment', to='core.homeworksubmission')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='homework_sub_new_comment', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('homeworksubmission', 'user')},
            },
        ),
        migrations.CreateModel(
            name='InstructorEducation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('degree', models.CharField(blank=True, max_length=500, null=True)),
                ('university_name', models.CharField(blank=True, max_length=500, null=True)),
                ('university_city', models.CharField(blank=True, max_length=150, null=True)),
                ('university_country', models.CharField(blank=True, max_length=200, null=True)),
                ('session_start', models.DateField(blank=True, null=True)),
                ('session_end', models.DateField(blank=True, null=True)),
                ('degree_details', models.CharField(blank=True, max_length=500, null=True)),
                ('is_publish', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('edited_at', models.DateTimeField(auto_now=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='instructor_educations_created', to=settings.AUTH_USER_MODEL)),
                ('instructor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='instructor_educations', to='core.instructor')),
            ],
            options={
                'unique_together': {('instructor', 'degree', 'university_name')},
            },
        ),
        migrations.CreateModel(
            name='InstructorTime',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day', models.CharField(blank=True, max_length=10, null=True)),
                ('time', models.TimeField(blank=True, null=True)),
                ('booked_status', models.BooleanField(blank=True, default=False, null=True)),
                ('instructor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='instructor_time', to='core.instructor')),
            ],
            options={
                'unique_together': {('day', 'time', 'instructor')},
            },
        ),
        migrations.CreateModel(
            name='ModuleContentView',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_created', models.DateTimeField(auto_now_add=True)),
                ('time_edited', models.DateTimeField(auto_now=True)),
                ('module_content', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='module_content_views', to='core.modulecontent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='module_content_views', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('module_content', 'user')},
            },
        ),
        migrations.CreateModel(
            name='QAMediaFile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(max_length=256, upload_to=core.models.exam_file_upload_path)),
                ('name', models.CharField(max_length=32)),
                ('file_type', models.CharField(max_length=5)),
                ('ans', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='core.descriptiveqans')),
            ],
            options={
                'constraints': [models.UniqueConstraint(fields=('name', 'ans'), name='unique docs_file_type')],
            },
        ),
        migrations.CreateModel(
            name='PictureForQuestion',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(max_length=256, upload_to=core.models.question_picture_upload_path)),
                ('name', models.CharField(max_length=32)),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='question_picture', to='core.question')),
            ],
            options={
                'constraints': [models.UniqueConstraint(fields=('name', 'question'), name='unique question_picture_type')],
            },
        ),
        migrations.AddConstraint(
            model_name='studentexam',
            constraint=models.UniqueConstraint(fields=('exam', 'user'), name='unique student_exam'),
        ),
        migrations.AddConstraint(
            model_name='mcqans',
            constraint=models.UniqueConstraint(fields=('student_exam', 'mcq'), name='unique mcq_ans'),
        ),
        migrations.AddConstraint(
            model_name='descriptiveqans',
            constraint=models.UniqueConstraint(fields=('student_exam', 'descriptive_q'), name='unique descriptive_q_ans'),
        ),
    ]
