from django.db import models class ExamSection(models.Model): class SectionType(models.IntegerChoices): INSTRUCTION = 0 QUESTION = 1 variant = models.ForeignKey("labs.ExamVariant", on_delete=models.CASCADE) title = models.CharField(max_length=255) section_type = models.IntegerField(choices=SectionType.choices, default=SectionType.INSTRUCTION) content = models.JSONField(default=dict) display_order = models.IntegerField(default=0) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: db_table = "exam_sections"