mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-01 01:52:02 +00:00
132 lines
6.4 KiB
Python
132 lines
6.4 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.9.12 on 2017-02-06 09:19
|
|
from __future__ import unicode_literals
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import jsonfield.fields
|
|
import utils.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('problem', '0001_initial'),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ACMContestRank',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('total_submission_number', models.IntegerField(default=0)),
|
|
('total_ac_number', models.IntegerField(default=0)),
|
|
('total_time', models.IntegerField(default=0)),
|
|
('submission_info', jsonfield.fields.JSONField(default={})),
|
|
],
|
|
options={
|
|
'db_table': 'acm_contest_rank',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Contest',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=40)),
|
|
('description', utils.models.RichTextField()),
|
|
('real_time_rank', models.BooleanField()),
|
|
('password', models.CharField(blank=True, max_length=30, null=True)),
|
|
('rule_type', models.CharField(max_length=36)),
|
|
('start_time', models.DateTimeField()),
|
|
('end_time', models.DateTimeField()),
|
|
('create_time', models.DateTimeField(auto_now_add=True)),
|
|
('last_update_time', models.DateTimeField(auto_now=True)),
|
|
('visible', models.BooleanField(default=True)),
|
|
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'db_table': 'contest',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ContestAnnouncement',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=128)),
|
|
('content', utils.models.RichTextField()),
|
|
('create_time', models.DateTimeField(auto_now_add=True)),
|
|
('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contest.Contest')),
|
|
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'db_table': 'contest_announcement',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ContestProblem',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=128)),
|
|
('description', utils.models.RichTextField()),
|
|
('input_description', utils.models.RichTextField()),
|
|
('output_description', utils.models.RichTextField()),
|
|
('samples', jsonfield.fields.JSONField()),
|
|
('test_case_id', models.CharField(max_length=32)),
|
|
('test_case_score', jsonfield.fields.JSONField()),
|
|
('hint', utils.models.RichTextField(blank=True, null=True)),
|
|
('languages', jsonfield.fields.JSONField()),
|
|
('template', jsonfield.fields.JSONField()),
|
|
('create_time', models.DateTimeField(auto_now_add=True)),
|
|
('last_update_time', models.DateTimeField(blank=True, null=True)),
|
|
('time_limit', models.IntegerField()),
|
|
('memory_limit', models.IntegerField()),
|
|
('spj', models.BooleanField(default=False)),
|
|
('spj_language', models.CharField(blank=True, max_length=32, null=True)),
|
|
('spj_code', models.TextField(blank=True, null=True)),
|
|
('spj_version', models.CharField(blank=True, max_length=32, null=True)),
|
|
('rule_type', models.CharField(max_length=32)),
|
|
('visible', models.BooleanField(default=True)),
|
|
('difficulty', models.CharField(max_length=32)),
|
|
('source', models.CharField(blank=True, max_length=200, null=True)),
|
|
('total_submit_number', models.IntegerField(default=0)),
|
|
('total_accepted_number', models.IntegerField(default=0)),
|
|
('sort_index', models.CharField(max_length=30)),
|
|
('is_public', models.BooleanField(default=False)),
|
|
('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contest.Contest')),
|
|
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
('tags', models.ManyToManyField(to='problem.ProblemTag')),
|
|
],
|
|
options={
|
|
'db_table': 'contest_problem',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='OIContestRank',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('total_submission_number', models.IntegerField(default=0)),
|
|
('total_score', models.IntegerField(default=0)),
|
|
('submission_info', jsonfield.fields.JSONField(default={})),
|
|
('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contest.Contest')),
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'db_table': 'oi_contest_rank',
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name='acmcontestrank',
|
|
name='contest',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contest.Contest'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='acmcontestrank',
|
|
name='user',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
|
),
|
|
]
|