text: # -*- coding: utf-8 -*-
  # Generated by Django 1.9.4 on 2016-04-20 13:24
  from __future__ import unicode_literals
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import role.models
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Courseware',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=128)),
                  ('pub_datetime', models.DateTimeField(auto_now_add=True)),
                  ('file', models.FileField(upload_to=role.models.resource_file_path)),
              ],
              options={
                  'db_table': 'role_courseware',
                  'verbose_name': '\u8bfe\u4ef6',
                  'verbose_name_plural': '\u8bfe\u4ef6',
              },
          ),
          migrations.CreateModel(
              name='Student',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('number', models.IntegerField(blank=True, null=True, unique=True)),
                  ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='StuToSub',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='role.Student')),
              ],
              options={
                  'verbose_name': '\u5b66\u751f\u79d1\u76ee\u5173\u7cfb',
                  'verbose_name_plural': '\u5b66\u751f\u79d1\u76ee\u5173\u7cfb',
              },
          ),
          migrations.CreateModel(
              name='Subject',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('number', models.IntegerField(unique=True)),
                  ('name', models.CharField(max_length=32, unique=True)),
              ],
              options={
                  'verbose_name': '\u79d1\u76ee',
                  'verbose_name_plural': '\u79d1\u76ee',
              },
          ),
          migrations.CreateModel(
              name='Teacher',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('number', models.IntegerField(blank=True, null=True, unique=True)),
                  ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.AddField(
              model_name='subject',
              name='teacher',
              field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='role.Teacher'),
          ),
          migrations.AddField(
              model_name='stutosub',
              name='subject',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='role.Subject'),
          ),
          migrations.AddField(
              model_name='courseware',
              name='subject',
              field=models.ManyToManyField(to='role.Subject'),
          ),
          migrations.AddField(
              model_name='courseware',
              name='teacher',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='role.Teacher'),
          ),
      ]
  