# Generated by Django 2.0.4 on 2018-04-08 15:27

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='course_name')),
                ('desc', models.CharField(max_length=300, verbose_name='course_description')),
                ('detail', models.TextField(verbose_name='course_detail')),
                ('degree', models.CharField(choices=[('junior', '初级'), ('intermediate', '中级'), ('senior', '高级')], max_length=15)),
                ('learn_time', models.IntegerField(default=0, verbose_name='learn_time(minute)')),
                ('student', models.IntegerField(default=0, verbose_name='student_number')),
                ('fav_num', models.IntegerField(default=0, verbose_name='favorite')),
                ('image', models.ImageField(upload_to='course/%Y/%m', verbose_name='cover_picture')),
                ('click_num', models.IntegerField(default=0, verbose_name='click_number')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
            ],
            options={
                'verbose_name': 'course',
                'verbose_name_plural': 'course',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('download', models.FileField(upload_to='course/resource/%Y/%m', verbose_name='resource_file')),
                ('name', models.CharField(max_length=100, verbose_name='resource_name')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.Course', verbose_name='course')),
            ],
            options={
                'verbose_name': 'resource',
                'verbose_name_plural': 'resource',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='lesson_name')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.Course', verbose_name='course')),
            ],
            options={
                'verbose_name': 'lesson',
                'verbose_name_plural': 'lesson',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='video_name')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
                ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.Course', verbose_name='lesson')),
            ],
            options={
                'verbose_name': 'video',
                'verbose_name_plural': 'video',
            },
        ),
    ]
