Skip to content

Commit

Permalink
backend for timers
Browse files Browse the repository at this point in the history
  • Loading branch information
benjmnxu committed Oct 11, 2024
1 parent a618472 commit 869d5f5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.0.3 on 2024-10-11 21:08

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("ohq", "0020_auto_20240326_0226"),
]

operations = [
migrations.AddField(
model_name="queue",
name="question_timer_enabled",
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name="queue",
name="question_timer_start_time",
field=models.IntegerField(blank=True, null=True),
),
]
4 changes: 4 additions & 0 deletions backend/ohq/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class Course(models.Model):
invite_only = models.BooleanField(default=False)
members = models.ManyToManyField(User, through="Membership", through_fields=("course", "user"))


# MAX_NUMBER_COURSE_USERS = 1000

class Meta:
Expand Down Expand Up @@ -215,6 +216,9 @@ class Queue(models.Model):
rate_limit_questions = models.IntegerField(blank=True, null=True)
rate_limit_minutes = models.IntegerField(blank=True, null=True)

question_timer_enabled = models.BooleanField(default=False)
question_timer_start_time = models.IntegerField(blank=True, null=True)

video_chat_setting = models.CharField(
max_length=8, choices=VIDEO_CHOICES, default=VIDEO_OPTIONAL
)
Expand Down
2 changes: 2 additions & 0 deletions backend/ohq/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ class Meta:
"rate_limit_length",
"rate_limit_questions",
"rate_limit_minutes",
"question_timer_enabled",
"question_timer_start_time",
"video_chat_setting",
"pin",
"pin_enabled",
Expand Down

0 comments on commit 869d5f5

Please sign in to comment.