You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1007 lines
36 KiB
1007 lines
36 KiB
# Generated by Django 4.2.27 on 2026-01-22 10:48
|
|
|
|
import apps.course.models.course
|
|
import apps.course.models.lesson
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import utils.schema
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
("account", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Attachment",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"title",
|
|
models.CharField(max_length=255, verbose_name="Attachment Title"),
|
|
),
|
|
(
|
|
"file",
|
|
models.FileField(
|
|
upload_to=apps.course.models.course.attachment_file_upload_to,
|
|
verbose_name="Attachment File",
|
|
),
|
|
),
|
|
(
|
|
"file_size",
|
|
models.PositiveIntegerField(
|
|
blank=True, null=True, verbose_name="File Size (in bytes)"
|
|
),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Attachment",
|
|
"verbose_name_plural": "Attachments",
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="Course",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"title",
|
|
models.CharField(max_length=255, verbose_name="Course Title"),
|
|
),
|
|
("slug", models.SlugField(allow_unicode=True, unique=True)),
|
|
(
|
|
"thumbnail",
|
|
models.ImageField(
|
|
upload_to="courses/thumbnails/", verbose_name="Thumbnail"
|
|
),
|
|
),
|
|
(
|
|
"video_type",
|
|
models.CharField(
|
|
choices=[
|
|
("youtube_link", "Youtube Link"),
|
|
("video_file", "Video File"),
|
|
],
|
|
max_length=20,
|
|
verbose_name="Preview Video Type (YouTube Link or File Upload)",
|
|
),
|
|
),
|
|
(
|
|
"video_file",
|
|
models.FileField(
|
|
blank=True,
|
|
null=True,
|
|
upload_to=apps.course.models.course.course_file_upload_to,
|
|
),
|
|
),
|
|
("video_link", models.CharField(blank=True, max_length=500, null=True)),
|
|
(
|
|
"is_online",
|
|
models.BooleanField(default=False, verbose_name="Is Online Course"),
|
|
),
|
|
(
|
|
"online_link",
|
|
models.CharField(
|
|
blank=True,
|
|
max_length=500,
|
|
null=True,
|
|
verbose_name="Online Class Link",
|
|
),
|
|
),
|
|
(
|
|
"level",
|
|
models.CharField(
|
|
choices=[
|
|
("beginner", "Beginner"),
|
|
("mid", "Mid Level"),
|
|
("advanced", "Advanced"),
|
|
],
|
|
max_length=10,
|
|
verbose_name="Course Level",
|
|
),
|
|
),
|
|
(
|
|
"duration",
|
|
models.PositiveIntegerField(verbose_name="Duration (in hours)"),
|
|
),
|
|
(
|
|
"lessons_count",
|
|
models.PositiveIntegerField(verbose_name="Number of Lessons"),
|
|
),
|
|
("description", models.TextField(verbose_name="Course Description")),
|
|
(
|
|
"short_description",
|
|
models.CharField(
|
|
blank=True,
|
|
max_length=500,
|
|
null=True,
|
|
verbose_name="Short Description",
|
|
),
|
|
),
|
|
(
|
|
"status",
|
|
models.CharField(
|
|
choices=[
|
|
("inactive", "Inactive"),
|
|
("upcoming", "Upcoming"),
|
|
("registering", "Registering"),
|
|
("ongoing", "Ongoing"),
|
|
("finished", "Finished"),
|
|
],
|
|
default="inactive",
|
|
max_length=15,
|
|
verbose_name="Course Status",
|
|
),
|
|
),
|
|
("is_free", models.BooleanField(default=True, verbose_name="Is Free")),
|
|
(
|
|
"price",
|
|
models.DecimalField(
|
|
decimal_places=2,
|
|
default=0.0,
|
|
max_digits=10,
|
|
verbose_name="Course Price",
|
|
),
|
|
),
|
|
(
|
|
"discount_percentage",
|
|
models.PositiveIntegerField(
|
|
default=0, verbose_name="Discount Percentage"
|
|
),
|
|
),
|
|
(
|
|
"final_price",
|
|
models.DecimalField(
|
|
blank=True,
|
|
decimal_places=2,
|
|
default=0.0,
|
|
help_text="This field is automatically calculated based on the discount percentage.",
|
|
max_digits=10,
|
|
verbose_name="Course Final Price",
|
|
),
|
|
),
|
|
(
|
|
"timing",
|
|
models.JSONField(
|
|
blank=True,
|
|
default=utils.schema.default_timing,
|
|
null=True,
|
|
verbose_name="Timing",
|
|
),
|
|
),
|
|
(
|
|
"features",
|
|
models.JSONField(
|
|
blank=True,
|
|
default=dict,
|
|
null=True,
|
|
verbose_name="Course features",
|
|
),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Course",
|
|
"verbose_name_plural": "Courses",
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="CourseCategory",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"name",
|
|
models.CharField(max_length=255, verbose_name="Category Name"),
|
|
),
|
|
("slug", models.SlugField(max_length=255, unique=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="CourseLiveSession",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"room_id",
|
|
models.CharField(
|
|
blank=True,
|
|
help_text="Identifier of the PlugNMeet room.",
|
|
max_length=255,
|
|
null=True,
|
|
unique=True,
|
|
verbose_name="Room ID",
|
|
),
|
|
),
|
|
(
|
|
"subject",
|
|
models.CharField(
|
|
help_text="Topic of the live session.",
|
|
max_length=255,
|
|
verbose_name="Subject",
|
|
),
|
|
),
|
|
(
|
|
"started_at",
|
|
models.DateTimeField(
|
|
help_text="Start time of the live session.",
|
|
verbose_name="Started At",
|
|
),
|
|
),
|
|
(
|
|
"ended_at",
|
|
models.DateTimeField(
|
|
blank=True,
|
|
help_text="End time of the live session.",
|
|
null=True,
|
|
verbose_name="Ended At",
|
|
),
|
|
),
|
|
(
|
|
"recorded_file",
|
|
models.FileField(
|
|
blank=True,
|
|
help_text="Recorded file of the live session.",
|
|
null=True,
|
|
upload_to="live_session_recordings/",
|
|
verbose_name="Recorded File",
|
|
),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created At"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
(
|
|
"course",
|
|
models.ForeignKey(
|
|
help_text="Course that this live session belongs to.",
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="live_sessions",
|
|
to="course.course",
|
|
verbose_name="Course",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Course Live Session",
|
|
"verbose_name_plural": "Course Live Sessions",
|
|
"ordering": ("-started_at", "-id"),
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="Glossary",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"title",
|
|
models.CharField(max_length=555, verbose_name="Glossary Title"),
|
|
),
|
|
("description", models.TextField(verbose_name="Description")),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Glossary",
|
|
"verbose_name_plural": "Glossaries",
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="Lesson",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"title",
|
|
models.CharField(max_length=255, verbose_name="Lesson Title"),
|
|
),
|
|
(
|
|
"content_type",
|
|
models.CharField(
|
|
choices=[
|
|
("youtube_link", "Youtube Link"),
|
|
("video_file", "Video File"),
|
|
],
|
|
max_length=50,
|
|
verbose_name="Content Type",
|
|
),
|
|
),
|
|
(
|
|
"content_file",
|
|
models.FileField(
|
|
blank=True,
|
|
null=True,
|
|
upload_to=apps.course.models.lesson.lesson_file_upload_to,
|
|
),
|
|
),
|
|
(
|
|
"video_link",
|
|
models.CharField(
|
|
blank=True, max_length=500, null=True, verbose_name="Link"
|
|
),
|
|
),
|
|
(
|
|
"duration",
|
|
models.PositiveIntegerField(verbose_name="Duration (in minutes)"),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Lesson",
|
|
"verbose_name_plural": "Lessons",
|
|
"indexes": [
|
|
models.Index(
|
|
fields=["content_type"], name="course_less_content_e1cf57_idx"
|
|
),
|
|
models.Index(
|
|
fields=["created_at"], name="course_less_created_4efb58_idx"
|
|
),
|
|
],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="CourseLesson",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"title",
|
|
models.CharField(
|
|
blank=True,
|
|
max_length=255,
|
|
null=True,
|
|
verbose_name="Course Lesson Title",
|
|
),
|
|
),
|
|
(
|
|
"priority",
|
|
models.IntegerField(blank=True, null=True, verbose_name="Priority"),
|
|
),
|
|
(
|
|
"is_active",
|
|
models.BooleanField(default=True, verbose_name="Is Active"),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
(
|
|
"course",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="lessons",
|
|
to="course.course",
|
|
verbose_name="Course",
|
|
),
|
|
),
|
|
(
|
|
"lesson",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="course_lessons",
|
|
to="course.lesson",
|
|
verbose_name="Lesson",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Course Lesson",
|
|
"verbose_name_plural": "Course Lessons",
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="CourseGlossary",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
(
|
|
"course",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="glossaries",
|
|
to="course.course",
|
|
verbose_name="Course",
|
|
),
|
|
),
|
|
(
|
|
"glossary",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="course_glossaries",
|
|
to="course.glossary",
|
|
verbose_name="Glossary",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Course Glossary",
|
|
"verbose_name_plural": "Course Glossaries",
|
|
"ordering": ("-id",),
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="CourseAttachment",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
(
|
|
"attachment",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="course_attachments",
|
|
to="course.attachment",
|
|
verbose_name="Attachment",
|
|
),
|
|
),
|
|
(
|
|
"course",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="attachments",
|
|
to="course.course",
|
|
verbose_name="Course",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Course Attachment",
|
|
"verbose_name_plural": "Course Attachments",
|
|
"ordering": ("-id",),
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name="course",
|
|
name="category",
|
|
field=models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="courses",
|
|
to="course.coursecategory",
|
|
verbose_name="Category",
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="course",
|
|
name="professor",
|
|
field=models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="courses",
|
|
to="account.professoruser",
|
|
),
|
|
),
|
|
migrations.CreateModel(
|
|
name="Participant",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("is_active", models.BooleanField(default=True)),
|
|
("joined_date", models.DateTimeField(auto_now_add=True)),
|
|
("unread_messages_count", models.IntegerField(default=0)),
|
|
(
|
|
"course",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="participants",
|
|
to="course.course",
|
|
),
|
|
),
|
|
(
|
|
"student",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="participated_courses",
|
|
to="account.studentuser",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"indexes": [
|
|
models.Index(
|
|
fields=["student"], name="course_part_student_566b08_idx"
|
|
),
|
|
models.Index(
|
|
fields=["course"], name="course_part_course__7cbf7c_idx"
|
|
),
|
|
models.Index(
|
|
fields=["joined_date"], name="course_part_joined__27eaa0_idx"
|
|
),
|
|
models.Index(
|
|
fields=["student", "course"],
|
|
name="course_part_student_c97a97_idx",
|
|
),
|
|
],
|
|
"unique_together": {("student", "course")},
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="LiveSessionUser",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"role",
|
|
models.CharField(
|
|
choices=[
|
|
("participant", "Participant"),
|
|
("moderator", "Moderator"),
|
|
("observer", "Observer"),
|
|
],
|
|
help_text="Role of the user in the session",
|
|
max_length=50,
|
|
verbose_name="Role",
|
|
),
|
|
),
|
|
(
|
|
"entered_at",
|
|
models.DateTimeField(
|
|
help_text="Time the user entered the session",
|
|
verbose_name="Entered At",
|
|
),
|
|
),
|
|
(
|
|
"exited_at",
|
|
models.DateTimeField(
|
|
blank=True,
|
|
default=None,
|
|
help_text="Time the user exited the session",
|
|
null=True,
|
|
verbose_name="Exited At",
|
|
),
|
|
),
|
|
(
|
|
"is_online",
|
|
models.BooleanField(
|
|
default=True,
|
|
help_text="Is the user currently online?",
|
|
verbose_name="Is online",
|
|
),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created At"),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(auto_now=True, verbose_name="Updated At"),
|
|
),
|
|
(
|
|
"session",
|
|
models.ForeignKey(
|
|
help_text="Live session that the user joined.",
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="user_sessions",
|
|
to="course.courselivesession",
|
|
verbose_name="Live Session",
|
|
),
|
|
),
|
|
(
|
|
"user",
|
|
models.ForeignKey(
|
|
help_text="User participating in the live session.",
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="live_session_entries",
|
|
to=settings.AUTH_USER_MODEL,
|
|
verbose_name="User",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "User Session",
|
|
"verbose_name_plural": "User Sessions",
|
|
"ordering": ("-entered_at", "-id"),
|
|
"indexes": [
|
|
models.Index(
|
|
fields=["session", "user"],
|
|
name="course_live_session_b1eaa5_idx",
|
|
),
|
|
models.Index(
|
|
fields=["session", "is_online"],
|
|
name="course_live_session_5ef9bc_idx",
|
|
),
|
|
models.Index(
|
|
fields=["user", "is_online"],
|
|
name="course_live_user_id_384830_idx",
|
|
),
|
|
],
|
|
"unique_together": {("session", "user", "entered_at")},
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="LiveSessionRecording",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"title",
|
|
models.CharField(
|
|
help_text="Title of the recording",
|
|
max_length=255,
|
|
verbose_name="Title",
|
|
),
|
|
),
|
|
(
|
|
"file",
|
|
models.FileField(
|
|
help_text="File of the recorded session",
|
|
upload_to="recorded_sessions/",
|
|
verbose_name="Recording File",
|
|
),
|
|
),
|
|
(
|
|
"file_time",
|
|
models.DurationField(
|
|
blank=True,
|
|
help_text="Duration of the recording file",
|
|
null=True,
|
|
verbose_name="File Duration",
|
|
),
|
|
),
|
|
(
|
|
"recording_type",
|
|
models.CharField(
|
|
choices=[("voice", "Voice"), ("video", "Video")],
|
|
help_text="Type of the recording (voice or video)",
|
|
max_length=10,
|
|
verbose_name="Recording Type",
|
|
),
|
|
),
|
|
(
|
|
"thumbnail",
|
|
models.ImageField(
|
|
blank=True,
|
|
help_text="Thumbnail image for video recordings",
|
|
null=True,
|
|
upload_to="recording_thumbnails/",
|
|
verbose_name="Thumbnail",
|
|
),
|
|
),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(
|
|
auto_now_add=True,
|
|
help_text="Time the recording was created",
|
|
verbose_name="Created At",
|
|
),
|
|
),
|
|
(
|
|
"updated_at",
|
|
models.DateTimeField(
|
|
auto_now=True,
|
|
help_text="The datetime when the recording was last updated",
|
|
verbose_name="Updated At",
|
|
),
|
|
),
|
|
(
|
|
"is_active",
|
|
models.BooleanField(
|
|
default=True,
|
|
help_text="Whether this recording is active or not",
|
|
verbose_name="Is Active",
|
|
),
|
|
),
|
|
(
|
|
"session",
|
|
models.ForeignKey(
|
|
help_text="Live session that this recording belongs to.",
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="recordings",
|
|
to="course.courselivesession",
|
|
verbose_name="Live Session",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Live Session Recording",
|
|
"verbose_name_plural": "Live Session Recordings",
|
|
"ordering": ("-created_at", "-id"),
|
|
"indexes": [
|
|
models.Index(
|
|
fields=["session", "is_active"],
|
|
name="course_live_session_f35db0_idx",
|
|
),
|
|
models.Index(
|
|
fields=["session", "recording_type"],
|
|
name="course_live_session_84b2bf_idx",
|
|
),
|
|
],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name="LessonCompletion",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("completed_at", models.DateTimeField(auto_now_add=True)),
|
|
(
|
|
"created_at",
|
|
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
|
|
),
|
|
(
|
|
"course_lesson",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="completions",
|
|
to="course.courselesson",
|
|
),
|
|
),
|
|
(
|
|
"student",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="lesson_completions",
|
|
to="account.studentuser",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"indexes": [
|
|
models.Index(
|
|
fields=["student"], name="course_less_student_f3c9b8_idx"
|
|
),
|
|
models.Index(
|
|
fields=["course_lesson"], name="course_less_course__1f3841_idx"
|
|
),
|
|
models.Index(
|
|
fields=["completed_at"], name="course_less_complet_8d2220_idx"
|
|
),
|
|
models.Index(
|
|
fields=["student", "course_lesson"],
|
|
name="course_less_student_3b6367_idx",
|
|
),
|
|
],
|
|
"unique_together": {("student", "course_lesson")},
|
|
},
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselivesession",
|
|
index=models.Index(
|
|
fields=["course", "started_at"], name="course_cour_course__b8968b_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselivesession",
|
|
index=models.Index(
|
|
fields=["course", "created_at"], name="course_cour_course__142085_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselivesession",
|
|
index=models.Index(
|
|
fields=["room_id"], name="course_cour_room_id_ed0222_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselesson",
|
|
index=models.Index(
|
|
fields=["course"], name="course_cour_course__4afa4c_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselesson",
|
|
index=models.Index(
|
|
fields=["lesson"], name="course_cour_lesson__e5c835_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselesson",
|
|
index=models.Index(
|
|
fields=["priority"], name="course_cour_priorit_dedac7_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselesson",
|
|
index=models.Index(
|
|
fields=["is_active"], name="course_cour_is_acti_490c61_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselesson",
|
|
index=models.Index(
|
|
fields=["course", "priority"], name="course_cour_course__192d2c_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courselesson",
|
|
index=models.Index(
|
|
fields=["course", "is_active"], name="course_cour_course__7c6f06_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courseattachment",
|
|
index=models.Index(
|
|
fields=["course"], name="course_cour_course__106cc8_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="courseattachment",
|
|
index=models.Index(
|
|
fields=["attachment"], name="course_cour_attachm_2da12a_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="course",
|
|
index=models.Index(fields=["status"], name="course_cour_status_57ffd9_idx"),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="course",
|
|
index=models.Index(
|
|
fields=["is_free"], name="course_cour_is_free_9453a1_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="course",
|
|
index=models.Index(
|
|
fields=["created_at"], name="course_cour_created_49f06e_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="course",
|
|
index=models.Index(fields=["slug"], name="course_cour_slug_235a66_idx"),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="course",
|
|
index=models.Index(
|
|
fields=["status", "created_at"], name="course_cour_status_bfcd24_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="course",
|
|
index=models.Index(
|
|
fields=["category", "status"], name="course_cour_categor_26bb4d_idx"
|
|
),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="course",
|
|
index=models.Index(
|
|
fields=["professor", "status"], name="course_cour_profess_5eae9a_idx"
|
|
),
|
|
),
|
|
]
|