text: # -*- coding: utf-8 -*-
  # Generated by Django 1.9.8 on 2017-05-13 14:23
  from __future__ import unicode_literals
  
  import DjangoUeditor.models
  import ckeditor.fields
  import datetime
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Answer',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('answer', ckeditor.fields.RichTextField(blank=True, null=True)),
                  ('status', models.CharField(choices=[('unadopted', 'Unadopted'), ('adopted', 'Adopted')], default='unadopted', max_length=15)),
                  ('created_time', models.DateField(auto_now_add=True, db_index=True)),
              ],
              options={
                  'verbose_name': '\u56de\u7b54',
                  'verbose_name_plural': '\u56de\u7b54',
              },
          ),
          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='\u8bfe\u7a0b\u540d')),
                  ('desc', models.CharField(max_length=300, verbose_name='\u8bfe\u7a0b\u63cf\u8ff0')),
                  ('details', DjangoUeditor.models.UEditorField(default='', verbose_name='\u8bfe\u7a0b\u8be6\u60c5')),
                  ('level', models.CharField(choices=[('primary', '\u521d\u7ea7'), ('middle', '\u4e2d\u7ea7'), ('advanced', '\u9ad8\u7ea7')], max_length=10, verbose_name='\u96be\u5ea6')),
                  ('learning_time', models.IntegerField(default=0, verbose_name='\u5b66\u4e60\u65f6\u957f\uff08\u5206\u949f\uff09')),
                  ('student_nums', models.IntegerField(default=0, verbose_name='\u5b66\u4e60\u4eba\u6570')),
                  ('fav_nums', models.IntegerField(default=0, verbose_name='\u6536\u85cf\u4eba\u6570')),
                  ('image', models.ImageField(upload_to='course/%Y/%m', verbose_name='\u8bfe\u7a0b\u5c01\u9762')),
                  ('click_nums', models.IntegerField(default=0, verbose_name='\u70b9\u51fb\u91cf')),
                  ('price', models.IntegerField(default=0)),
                  ('notice', models.CharField(default='', max_length=200, verbose_name='\u8bfe\u524d\u9700\u77e5')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
              ],
              options={
                  'verbose_name': '\u8bfe\u7a0b\u4fe1\u606f',
                  'verbose_name_plural': '\u8bfe\u7a0b\u4fe1\u606f',
              },
          ),
          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='\u540d\u79f0')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                  ('download', models.FileField(upload_to='course/resource/%Y/%m', verbose_name='\u8d44\u6e90\u6587\u4ef6')),
              ],
              options={
                  'verbose_name': '\u8bfe\u7a0b\u8d44\u6e90',
                  'verbose_name_plural': '\u8bfe\u7a0b\u8d44\u6e90',
              },
          ),
          migrations.CreateModel(
              name='Forum',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=50, verbose_name='\u8bba\u575b\u540d\u79f0')),
                  ('answer_student_num', models.IntegerField(default=0)),
                  ('ask_student_num', models.IntegerField(default=0)),
                  ('image', models.ImageField(upload_to='course/%Y/%m', verbose_name='\u8bba\u575b\u5c0f\u7ec4\u5c01\u9762')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
              ],
              options={
                  'verbose_name': '\u8bba\u575b\u5c0f\u7ec4',
                  'verbose_name_plural': '\u8bba\u575b\u5c0f\u7ec4',
              },
          ),
          migrations.CreateModel(
              name='ForumResource',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=100, verbose_name='\u540d\u79f0')),
                  ('file', models.FileField(upload_to='forum/resource/%Y/%m', verbose_name='\u8d44\u6e90\u6587\u4ef6')),
                  ('type', models.CharField(choices=[('verification', 'Verification'), ('normal', 'Normal')], default='normal', max_length=15)),
                  ('status', models.CharField(choices=[('unpublished', 'Unpublished'), ('published', 'Published')], default='unpublished', max_length=15)),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
              ],
              options={
                  'verbose_name': '\u8bba\u575b\u8d44\u6e90',
                  'verbose_name_plural': '\u8bba\u575b\u8d44\u6e90',
              },
          ),
          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='\u7ae0\u8282\u540d\u79f0')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
              ],
              options={
                  'verbose_name': '\u7ae0\u8282',
                  'verbose_name_plural': '\u7ae0\u8282',
              },
          ),
          migrations.CreateModel(
              name='Question',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=30, verbose_name='\u6807\u9898')),
                  ('content', ckeditor.fields.RichTextField(blank=True, null=True, verbose_name='\u5185\u5bb9')),
                  ('status', models.CharField(choices=[('unsolved', 'Unsolved'), ('solved', 'Solved')], default='unsolved', max_length=10, verbose_name='\u95ee\u9898\u72b6\u6001')),
                  ('total_view', models.PositiveIntegerField(db_index=True, default=0, verbose_name='\u6d4f\u89c8\u91cf')),
                  ('created_time', models.DateField(auto_now_add=True, db_index=True)),
                  ('forum', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Forum', verbose_name='\u6240\u5c5e\u8bba\u575b')),
              ],
              options={
                  'verbose_name': '\u95ee\u9898',
                  'verbose_name_plural': '\u95ee\u9898',
              },
          ),
          migrations.CreateModel(
              name='Type',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=20, verbose_name='\u8bfe\u7a0b\u7c7b\u522b')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now)),
              ],
              options={
                  'verbose_name': '\u8bfe\u7a0b\u7c7b\u522b',
                  'verbose_name_plural': '\u8bfe\u7a0b\u7c7b\u522b',
              },
          ),
          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='\u89c6\u9891\u540d\u79f0')),
                  ('learning_time', models.IntegerField(default=0, verbose_name='\u5b66\u4e60\u65f6\u957f\uff08\u5206\u949f\uff09')),
                  ('url', models.CharField(default='', max_length=500, verbose_name='\u89c6\u9891\u5730\u5740')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                  ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Lesson', verbose_name='\u7ae0\u8282')),
              ],
              options={
                  'verbose_name': '\u89c6\u9891',
                  'verbose_name_plural': '\u89c6\u9891',
              },
          ),
      ]
  