OpenAPI中返回判题状态信息

This commit is contained in:
virusdefender 2016-02-17 21:07:43 +08:00
parent e4c299affe
commit 1f7f61616c
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class Submission(models.Model):
contest_id = models.IntegerField(blank=True, null=True)
problem_id = models.IntegerField(db_index=True)
# 这个字段可能存储很多数据 比如编译错误、系统错误的时候,存储错误原因字符串
# 正常运行的时候存储 lrun 的判题结果比如cpu时间内存之类的
# 正常运行的时候存储判题结果比如cpu时间内存之类的
info = models.TextField(blank=True, null=True)
accepted_answer_time = models.IntegerField(blank=True, null=True)
# 这个字段只有在题目是accepted 的时候才会用到,比赛题目的提交可能还会有得分等信息,存储在这里面

View File

@ -33,7 +33,7 @@ class OpenAPISubmissionSerializer(serializers.ModelSerializer):
class Meta:
model = Submission
fields = ["id", "result", "create_time", "language"]
fields = ["id", "result", "create_time", "language", "info"]
class SubmissionhareSerializer(serializers.Serializer):