# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-06-27 06:20
from __future__ import unicode_literals

import DjangoUeditor.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CoruseConnectionStudent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(verbose_name='分数')),
            ],
            options={
                'verbose_name': '课程学生映射关系',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='课程名称')),
                ('start_date', models.DateTimeField(verbose_name='开始时间')),
                ('end_date', models.DateTimeField(verbose_name='结束日期')),
                ('score', models.FloatField(verbose_name='学分')),
                ('img', models.ImageField(default='uploads/course/images/default.jpg', upload_to='uploads/course/images/', verbose_name='课程缩略图')),
                ('desc', DjangoUeditor.models.UEditorField(blank=True, default='', verbose_name='课程描述')),
                ('URL', models.CharField(default='', max_length=115, verbose_name='课程链接')),
                ('level', models.CharField(default='easy', max_length=200, verbose_name='课程难度')),
                ('state', models.BooleanField(verbose_name='状态')),
            ],
            options={
                'verbose_name': '课程',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag', models.CharField(default='', max_length=244, verbose_name='父栏目')),
            ],
            options={
                'verbose_name': '栏目',
            },
        ),
        migrations.AddField(
            model_name='course',
            name='tag',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.Tag', verbose_name='父栏目'),
        ),
        migrations.AddField(
            model_name='course',
            name='teacher',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='教师'),
        ),
        migrations.AddField(
            model_name='coruseconnectionstudent',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.Course'),
        ),
        migrations.AddField(
            model_name='coruseconnectionstudent',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
