# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-04-08 02:49
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('account', '0006_user_preference_problem_detail_mode'),
        ('problem', '0005_problem_classify'),
    ]

    operations = [
        migrations.CreateModel(
            name='Contest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=100, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('start_time', models.IntegerField(default=0)),
                ('end_time', models.IntegerField(default=0)),
                ('pause', models.BooleanField(default=False)),
                ('user_limit', models.TextField(blank=True, default='all', null=True)),
                ('lang', models.CharField(blank=True, default='all', max_length=255, null=True)),
                ('ignore_flag', models.CharField(blank=True, default='', max_length=255, null=True)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.User')),
                ('judge_status', models.ManyToManyField(blank=True, to='problem.JudgeStatus')),
                ('referees', models.ManyToManyField(blank=True, related_name='contest_referees', to='account.User')),
            ],
        ),
        migrations.CreateModel(
            name='ContestProblems',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('index', models.IntegerField(default=0)),
                ('accepted', models.IntegerField(default=0)),
                ('submission', models.IntegerField(default=0)),
                ('lang', models.CharField(blank=True, default='inherit', max_length=255, null=True)),
                ('judge_style', models.IntegerField(default=0)),
                ('problem', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='problem.Problem')),
            ],
        ),
        migrations.CreateModel(
            name='ContestSolution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submission', models.IntegerField(default=0)),
                ('ignore', models.IntegerField(default=0)),
                ('accepted', models.IntegerField(default=0)),
                ('first_ac_time', models.IntegerField(default=-1)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.User')),
                ('content', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='contest.ContestProblems')),
                ('judge_status', models.ManyToManyField(blank=True, to='problem.JudgeStatus')),
                ('problems', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='problem.Problem')),
            ],
        ),
        migrations.CreateModel(
            name='FAQ',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_notice', models.BooleanField(default=False)),
                ('subject', models.CharField(blank=True, default='', max_length=100, null=True)),
                ('content', models.TextField(blank=True, default='', null=True)),
                ('create_time', models.IntegerField(default=0)),
                ('answer_content', models.TextField(blank=True, default='', null=True)),
                ('answer_time', models.IntegerField(default=0)),
                ('is_private', models.BooleanField(default=True)),
                ('answer_referee', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='answer_referees', to='account.User')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.User')),
            ],
        ),
    ]
