# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-29 09:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0003_prize'),
    ]

    operations = [
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Например, "Тренировка 01"', max_length=256, verbose_name='Название')),
                ('contest_id', models.IntegerField(default=0, help_text='ID контеста или 0, если такого нет')),
                ('date', models.DateField()),
                ('description', models.TextField(blank=True, default='')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Group')),
            ],
            options={
                'verbose_name': 'занятие',
                'verbose_name_plural': 'занятия',
            },
        ),
        migrations.CreateModel(
            name='LessonAttachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Например. "План лекции"', max_length=256, verbose_name='Название')),
                ('file', models.FileField(upload_to='', verbose_name='Файл')),
                ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Lesson')),
            ],
            options={
                'verbose_name': 'файл',
                'verbose_name_plural': 'файлы',
            },
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField(default=0)),
                ('when', models.DateTimeField(auto_now=True)),
                ('receiver', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='receiver', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sender', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'транзакция',
                'verbose_name_plural': 'транзакции',
            },
        ),
        migrations.AlterField(
            model_name='prize',
            name='picture',
            field=models.ImageField(upload_to='prizes', verbose_name='Картинка'),
        ),
    ]
