# Generated by Django 2.0.7 on 2018-09-11 19:56

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('study', '0005_auto_20180911_1956'),
    ]

    operations = [
        migrations.CreateModel(
            name='OrderBase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('register_date', models.DateTimeField(default=django.utils.timezone.now, editable=False, verbose_name='购买时间')),
                ('apply_bill', models.BooleanField(default=False, verbose_name='是否已经申请了发票')),
                ('is_draw_bill', models.BooleanField(default=False, verbose_name='是否已经开了发票')),
                ('taitou_type', models.IntegerField(default=1, verbose_name='发票类型,1:个人，2：公司')),
                ('taitou_text', models.CharField(blank=True, default='', max_length=256, null=True, verbose_name='抬头')),
                ('recognition_id', models.CharField(blank=True, default='', max_length=256, null=True, verbose_name='纳税人识别号')),
                ('email', models.EmailField(blank=True, default='', max_length=256, null=True, verbose_name='收件电子邮箱')),
                ('price', models.IntegerField(default=0, verbose_name='价格')),
                ('invoice_date', models.DateTimeField(auto_now=True, verbose_name='申请发票时间')),
            ],
            options={
                'ordering': ['-register_date'],
                'verbose_name': 'o订单',
                'verbose_name_plural': 'o订单',
            },
        ),
        migrations.CreateModel(
            name='VideoCurriculumOrder',
            fields=[
                ('orderbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='userinfo.OrderBase')),
                ('video_curriculum', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='study.VideoCurriculum', verbose_name='所属视频课程')),
            ],
            options={
                'ordering': ['-register_date'],
                'verbose_name': 'o1课程订单',
                'verbose_name_plural': 'o1课程订单',
            },
            bases=('userinfo.orderbase',),
        ),
        migrations.CreateModel(
            name='VideoInfoLectureOrder',
            fields=[
                ('orderbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='userinfo.OrderBase')),
                ('video', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='study.VideoInfoLecture', verbose_name='所属免费视频讲座视频')),
            ],
            options={
                'ordering': ['-register_date'],
                'verbose_name': 'o1免费视频讲座视频订单',
                'verbose_name_plural': 'o1免费视频讲座视频订单',
            },
            bases=('userinfo.orderbase',),
        ),
        migrations.CreateModel(
            name='VideoInfoStudyFuyangOrder',
            fields=[
                ('orderbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='userinfo.OrderBase')),
                ('video', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='study.VideoInfoStudyFuyang', verbose_name='所属天天乐视频')),
            ],
            options={
                'ordering': ['-register_date'],
                'verbose_name': 'o1天天乐视频订单',
                'verbose_name_plural': 'o1天天乐视频订单',
            },
            bases=('userinfo.orderbase',),
        ),
        migrations.AddField(
            model_name='orderbase',
            name='purchaser',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='购买者'),
        ),
    ]
