# Generated by Django 2.2 on 2019-08-27 17:01

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
                ('name', models.CharField(max_length=50, verbose_name='course name')),
                ('desc', models.CharField(max_length=300, verbose_name='course description')),
                ('learn_times', models.IntegerField(default=0, verbose_name='learn_time(minutes)')),
                ('degree', models.CharField(choices=[('easy', 'easy'), ('medium', 'medium'), ('hard', 'hard')], max_length=8, verbose_name='degree')),
                ('students', models.IntegerField(default=0, verbose_name='number of students')),
                ('fav_nums', models.IntegerField(default=0, verbose_name='click number')),
                ('category', models.CharField(default='backend', max_length=20, verbose_name='category of the course')),
                ('tag', models.CharField(default='', max_length=10, verbose_name="course's tag")),
                ('youneed_know', models.CharField(default='', max_length=300, verbose_name='what you need to know')),
                ('teacher_tell', models.CharField(default='', max_length=300, verbose_name="teacher's advice")),
                ('detail', models.TextField(verbose_name='detail of course')),
                ('image', models.ImageField(upload_to='courses/%Y/%m', verbose_name='cover image')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organizations.Teacher', verbose_name='teacher')),
            ],
            options={
                'verbose_name': 'course information',
                'verbose_name_plural': 'course information',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
                ('name', models.CharField(max_length=100, verbose_name="lesson's name")),
                ('learn_times', models.IntegerField(default=0, verbose_name='learn_time(minutes)')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.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')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
                ('name', models.CharField(max_length=100, verbose_name='video name')),
                ('learn_times', models.IntegerField(default=0, verbose_name='learn_times(minutes)')),
                ('url', models.CharField(max_length=200, verbose_name='url to visit')),
                ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Lesson', verbose_name='Lesson')),
            ],
            options={
                'verbose_name': 'Video',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='add_time')),
                ('name', models.CharField(max_length=100, verbose_name='name')),
                ('file', models.FileField(max_length=200, upload_to='course/resourse/%y/%m', verbose_name='download address')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='course')),
            ],
            options={
                'verbose_name': 'course resource',
                'verbose_name_plural': 'course resource',
            },
        ),
    ]
