GP Ranking (#90)
This commit is contained in:
parent
9decd11218
commit
b4c1620497
9 changed files with 223 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue