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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('account', '0001_initial'),
        ('education', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CourseClassify',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=255, null=True)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='education.Course')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='problem.CourseClassify')),
            ],
        ),
        migrations.CreateModel(
            name='JudgeQueue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('queue_status', models.SmallIntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='JudgeStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('flag', models.SmallIntegerField(default=-2)),
                ('lang', models.CharField(blank=True, db_index=True, max_length=20, null=True)),
                ('timestamp', models.IntegerField(default=0)),
                ('exe_time', models.IntegerField(default=0)),
                ('exe_mem', models.IntegerField(default=0)),
                ('code_len', models.IntegerField(default=0)),
                ('code_path', models.CharField(blank=True, max_length=100, null=True)),
                ('callback', models.TextField(blank=True, null=True)),
                ('result', models.TextField(blank=True, null=True)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.User')),
            ],
        ),
        migrations.CreateModel(
            name='Problem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=255, null=True)),
                ('difficulty', models.SmallIntegerField(default=0)),
                ('description', models.TextField(blank=True, null=True)),
                ('perview', models.CharField(blank=True, max_length=255, null=True)),
                ('input', models.TextField(blank=True, null=True)),
                ('output', models.TextField(blank=True, null=True)),
                ('sample_input', models.TextField(blank=True, null=True)),
                ('sample_output', models.TextField(blank=True, null=True)),
                ('hint', models.TextField(blank=True, null=True)),
                ('source', models.TextField(blank=True, null=True)),
                ('demo_code', models.TextField(blank=True, null=True)),
                ('c_time_limit', models.IntegerField(default=0)),
                ('c_memory_limit', models.IntegerField(default=0)),
                ('java_time_limit', models.IntegerField(default=0)),
                ('java_memory_limit', models.IntegerField(default=0)),
                ('allow_predict', models.BooleanField(default=False)),
                ('is_show', models.BooleanField(default=False)),
                ('create_time', models.IntegerField(default=0)),
                ('update_time', models.IntegerField(default=0)),
                ('is_private', models.BooleanField(default=False)),
                ('disable_edit_by_other', models.BooleanField(default=False)),
                ('pause_judge', models.BooleanField(default=True)),
                ('total', models.IntegerField(default=0)),
                ('ac', models.IntegerField(default=0)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.User')),
                ('classify', models.ManyToManyField(blank=True, to='problem.CourseClassify')),
                ('pre_verify', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pv_user', to='account.User')),
            ],
        ),
        migrations.CreateModel(
            name='ProblemVisited',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submissions', models.IntegerField(default=0)),
                ('accepted', models.IntegerField(default=0)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.User')),
                ('problem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='problem.Problem')),
            ],
        ),
        migrations.CreateModel(
            name='TestData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, default=b'', max_length=255, null=True)),
                ('order', models.IntegerField(blank=True, default=0, null=True)),
                ('handle', models.CharField(blank=True, db_index=True, default=b'', max_length=255, null=True)),
                ('update_time', models.IntegerField(default=0)),
                ('available', models.BooleanField(default=True)),
                ('visible', models.BooleanField(default=True)),
            ],
        ),
        migrations.AddField(
            model_name='problem',
            name='test_data',
            field=models.ManyToManyField(blank=True, to='problem.TestData'),
        ),
        migrations.AddField(
            model_name='judgestatus',
            name='problem',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='problem.Problem'),
        ),
        migrations.AddField(
            model_name='judgequeue',
            name='judge_status',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='problem.JudgeStatus'),
        ),
    ]
