# Generated by Django 2.2.1 on 2019-06-10 07:47

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('consult', '0024_landingrequest'),
    ]

    operations = [
        migrations.CreateModel(
            name='Webinar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255)),
                ('slug', models.CharField(blank=True, max_length=50)),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('start_date', models.DateTimeField()),
                ('duration', models.IntegerField(default=60)),
            ],
        ),
        migrations.AddField(
            model_name='payment',
            name='type',
            field=models.CharField(choices=[('consult', 'Консультация'), ('webinar', 'Вебинар')], default='consult', max_length=20),
        ),
        migrations.AlterField(
            model_name='payment',
            name='enroll',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='payment', to='consult.Enroll'),
        ),
        migrations.CreateModel(
            name='WebinarEnroll',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('Webinar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='enroll', to='consult.Webinar')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='payment',
            name='webinar_enroll',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='payment', to='consult.WebinarEnroll'),
        ),
    ]
