# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-01 22:10
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', '0004_auto_20170729_0959'),
    ]

    operations = [
        migrations.CreateModel(
            name='Purchase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('when', models.DateTimeField(auto_now=True)),
                ('code', models.CharField(max_length=8, unique=True)),
                ('status', models.CharField(choices=[('PD', 'Оплачено'), ('RC', 'Получено'), ('DC', 'Отклонено'), ('RF', 'Возвращено')], default='PD', max_length=2)),
                ('prize', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Prize')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'покупка',
                'verbose_name_plural': 'покупки',
            },
        ),
        migrations.AlterModelOptions(
            name='lesson',
            options={'ordering': ('group__short_name', 'date'), 'verbose_name': 'занятие', 'verbose_name_plural': 'занятия'},
        ),
        migrations.AlterField(
            model_name='lesson',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to='main.Group'),
        ),
        migrations.AlterField(
            model_name='lessonattachment',
            name='file',
            field=models.FileField(upload_to='lessons', verbose_name='Файл'),
        ),
        migrations.AlterField(
            model_name='lessonattachment',
            name='lesson',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='main.Lesson'),
        ),
    ]
