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.
69 lines
2.2 KiB
69 lines
2.2 KiB
# Generated by Django 4.2.27 on 2026-01-22 10:48
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
initial = True
|
|
|
|
dependencies = [
|
|
("course", "0001_initial"),
|
|
("account", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Certificate",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"status",
|
|
models.CharField(
|
|
choices=[
|
|
("pending", "pending"),
|
|
("approved", "approved"),
|
|
("canceled", "canceled"),
|
|
],
|
|
default="pending",
|
|
max_length=10,
|
|
),
|
|
),
|
|
(
|
|
"certificate_file",
|
|
models.FileField(
|
|
blank=True,
|
|
null=True,
|
|
upload_to="certificates/",
|
|
verbose_name="certificate_file",
|
|
),
|
|
),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
("updated_at", models.DateTimeField(auto_now=True)),
|
|
(
|
|
"course",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="course_certificates",
|
|
to="course.course",
|
|
),
|
|
),
|
|
(
|
|
"student",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="certificates",
|
|
to="account.studentuser",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]
|