# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-17 07:04
from __future__ import unicode_literals

from django.conf import settings
import django.contrib.auth.models
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Banji',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('banji', models.CharField(max_length=50, verbose_name='班级')),
            ],
            options={
                'verbose_name_plural': '班级',
                'verbose_name': '班级',
            },
        ),
        migrations.CreateModel(
            name='College',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('college', models.CharField(max_length=50, verbose_name='学院')),
            ],
            options={
                'verbose_name_plural': '学院',
                'verbose_name': '学院',
            },
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('department', models.CharField(max_length=50, verbose_name='系别')),
                ('college', models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.CASCADE, to='RGPY.College', verbose_name='所属学院')),
            ],
            options={
                'verbose_name_plural': '系别',
                'verbose_name': '系别',
            },
        ),
        migrations.CreateModel(
            name='OurUser',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('phone', models.CharField(blank=True, max_length=11, null=True, verbose_name='用户手机')),
                ('level', models.CharField(choices=[('1', '学生'), ('2', '系管理员'), ('3', '院管理员'), ('4', '管理员')], default='1', max_length=1, verbose_name='用户级别')),
            ],
            options={
                'verbose_name_plural': '自定义用户',
                'verbose_name': '自定义用户',
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='CollegeManage',
            fields=[
                ('ouruser_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='RGPY.OurUser')),
            ],
            options={
                'verbose_name_plural': '院管理员',
                'verbose_name': '院管理员',
            },
            bases=('RGPY.ouruser',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='DepartmentManage',
            fields=[
                ('ouruser_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='RGPY.OurUser')),
            ],
            options={
                'verbose_name_plural': '系管理员',
                'verbose_name': '系管理员',
            },
            bases=('RGPY.ouruser',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Manage',
            fields=[
                ('ouruser_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='RGPY.OurUser')),
            ],
            options={
                'verbose_name_plural': '管理员',
                'verbose_name': '管理员',
            },
            bases=('RGPY.ouruser',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('ouruser_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='RGPY.OurUser')),
                ('is_banji_admin', models.BooleanField(default=False, help_text='是否是班级管理员.')),
                ('score', models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='已获时长')),
            ],
            options={
                'verbose_name_plural': '学生',
                'verbose_name': '学生',
            },
            bases=('RGPY.ouruser',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='banji',
            name='department',
            field=models.ForeignKey(blank=True, default=2, on_delete=django.db.models.deletion.CASCADE, to='RGPY.Department', verbose_name='所属系别'),
        ),
        migrations.AddField(
            model_name='student',
            name='banji',
            field=models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.CASCADE, to='RGPY.Banji', verbose_name='所属班级'),
        ),
        migrations.AddField(
            model_name='departmentmanage',
            name='banji',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='RGPY.Banji', verbose_name='管理班级'),
        ),
        migrations.AddField(
            model_name='departmentmanage',
            name='department',
            field=models.ForeignKey(blank=True, default=2, on_delete=django.db.models.deletion.CASCADE, to='RGPY.Department', verbose_name='管理的系别'),
        ),
    ]
