GP Ranking (#90)

This commit is contained in:
Phuoc Anh Kha Le 2023-10-06 03:54:37 -05:00 committed by GitHub
parent 9decd11218
commit b4c1620497
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 223 additions and 1 deletions

View file

@ -16,6 +16,7 @@ from judge.models.contest import (
ContestTag,
Rating,
ContestProblemClarification,
ContestsSummary,
)
from judge.models.interface import BlogPost, MiscConfig, NavigationBar, validate_regex
from judge.models.message import PrivateMessage, PrivateMessageThread

View file

@ -33,6 +33,7 @@ __all__ = [
"ContestSubmission",
"Rating",
"ContestProblemClarification",
"ContestsSummary",
]
@ -900,3 +901,24 @@ class ContestProblemClarification(models.Model):
date = models.DateTimeField(
verbose_name=_("clarification timestamp"), auto_now_add=True
)
class ContestsSummary(models.Model):
contests = models.ManyToManyField(
Contest,
)
scores = models.JSONField(
null=True,
blank=True,
)
key = models.CharField(
max_length=20,
unique=True,
)
class Meta:
verbose_name = _("contests summary")
verbose_name_plural = _("contests summaries")
def __str__(self):
return self.key