# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-04 13:03
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import main.models


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0011_auto_20170803_1739'),
    ]

    operations = [
        migrations.CreateModel(
            name='CasinoSession',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bet', models.IntegerField(default=0, verbose_name='Ставка')),
                ('time_bet', models.IntegerField(default=0, verbose_name='Ставка по времени')),
                ('solved', models.BooleanField(default=False, verbose_name='Задача решена')),
                ('solved_time', models.IntegerField(default=0, verbose_name='Время решения')),
                ('start', models.DateTimeField(auto_now=True, verbose_name='Начало сессии')),
            ],
            options={
                'verbose_name': 'сессия в казино',
                'verbose_name_plural': 'сессии в казино',
            },
        ),
        migrations.AddField(
            model_name='group',
            name='casino_contest',
            field=models.IntegerField(default=0, help_text='ID контеста или 0, если такого нет', verbose_name='Контест казино'),
        ),
        migrations.AddField(
            model_name='group',
            name='casino_statement',
            field=models.FileField(blank=True, null=True, upload_to=main.models.random_statement_path, verbose_name='Файл с условием задачи для казино'),
        ),
        migrations.AlterField(
            model_name='lesson',
            name='contest_id',
            field=models.IntegerField(default=0, help_text='ID контеста или 0, если такого нет', verbose_name='Контест в ejudge'),
        ),
        migrations.AddField(
            model_name='casinosession',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Group'),
        ),
        migrations.AddField(
            model_name='casinosession',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
