# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2018-02-13 13:59
from __future__ import unicode_literals

import DjangoUeditor.models
import datetime
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organization', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False, verbose_name='课程ID')),
                ('url', models.CharField(max_length=200, verbose_name='课程链接')),
                ('course_name', models.CharField(max_length=50, verbose_name='课程名')),
                ('students', models.IntegerField(default=0, verbose_name='学习人数')),
                ('degree', models.CharField(choices=[('cj', '初级'), ('zj', '中级'), ('gj', '高级')], max_length=2, verbose_name='课程难度')),
                ('learn_times', models.IntegerField(default=0, verbose_name='学习时长（分钟数）')),
                ('score', models.FloatField(default=0, verbose_name='综合评分')),
                ('course_desc', models.TextField(default='N', verbose_name='课程描述')),
                ('should_know', models.TextField(default='N', verbose_name='学前需知')),
                ('can_learn', models.TextField(default='N', verbose_name='此课能学')),
                ('category', models.CharField(default='无', max_length=50, verbose_name='课程类别')),
                ('course_img', models.CharField(max_length=200, verbose_name='封面')),
                ('course_introduction', DjangoUeditor.models.UEditorField(default='', verbose_name='课程详情')),
                ('course_label', models.CharField(default='', max_length=20, verbose_name='课程标签')),
                ('fav_nums', models.IntegerField(default=0, verbose_name='收藏人数')),
                ('click_nums', models.IntegerField(default=0, verbose_name='点击数')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('course_org', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='organization.CourseOrg', verbose_name='课程机构')),
                ('teacher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organization.Teacher', verbose_name='课程教师')),
            ],
            options={
                'verbose_name': '课程',
                'verbose_name_plural': '课程',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('download', models.FileField(upload_to='course/resource/%Y/%m', verbose_name='资源文件')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('Course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='课程')),
            ],
            options={
                'verbose_name': '资源文件',
                'verbose_name_plural': '资源文件',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('lesson_id', models.IntegerField(primary_key=True, serialize=False, verbose_name='章节ID')),
                ('lesson_name', models.CharField(max_length=100, verbose_name='章节名')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='课程')),
            ],
            options={
                'verbose_name': '章节',
                'verbose_name_plural': '章节',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('video_id', models.IntegerField(primary_key=True, serialize=False, verbose_name='视频ID')),
                ('video_name', models.CharField(max_length=100, verbose_name='视频名')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='课程')),
            ],
            options={
                'verbose_name': '视频',
                'verbose_name_plural': '视频',
            },
        ),
        migrations.CreateModel(
            name='BannerCourse',
            fields=[
            ],
            options={
                'verbose_name_plural': '轮播课程',
                'verbose_name': '轮播课程',
                'proxy': True,
            },
            bases=('courses.course',),
        ),
    ]
