diff --git a/contest/models.py b/contest/models.py index 1e4f45a..2708bcf 100644 --- a/contest/models.py +++ b/contest/models.py @@ -120,6 +120,9 @@ class ContestRank(models.Model): # key 是比赛题目的id submission_info = JSONField(default={}) + class Meta: + db_table = "contest_rank" + def update_rank(self, submission): if not submission.contest_id or submission.contest_id != self.contest_id: raise ValueError("Error submission type") diff --git a/group/models.py b/group/models.py index b399246..a2db074 100644 --- a/group/models.py +++ b/group/models.py @@ -37,5 +37,6 @@ class JoinGroupRequest(models.Model): # 是否处理 status = models.BooleanField(default=False) accepted = models.BooleanField(default=False) + class Meta: db_table = "join_group_request" diff --git a/problem/models.py b/problem/models.py index adb7dd4..331f003 100644 --- a/problem/models.py +++ b/problem/models.py @@ -45,6 +45,7 @@ class AbstractProblem(models.Model): total_accepted_number = models.IntegerField(default=0) class Meta: + db_table = "problem" abstract = True