add problem_statistic_info

This commit is contained in:
zemal
2017-08-15 21:05:41 +08:00
parent df185a233f
commit 1587192ff9
5 changed files with 58 additions and 27 deletions

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2017-08-15 12:58
from __future__ import unicode_literals
from django.db import migrations
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('problem', '0004_auto_20170501_0637'),
]
operations = [
migrations.AddField(
model_name='contestproblem',
name='statistic_info',
field=jsonfield.fields.JSONField(default={}),
),
migrations.AddField(
model_name='problem',
name='statistic_info',
field=jsonfield.fields.JSONField(default={}),
),
]

View File

@@ -57,6 +57,9 @@ class AbstractProblem(models.Model):
source = models.CharField(max_length=200, blank=True, null=True)
total_submit_number = models.BigIntegerField(default=0)
total_accepted_number = models.BigIntegerField(default=0)
# {0: 0, 1: 0, 2: 0, 3: 0 ...}
# the first number means JudgeStatus, the second number present count
statistic_info = JSONField(default={})
class Meta:
db_table = "problem"