# Generated by Django 2.0 on 2019-06-25 16:03

import ckeditor.fields
from django.db import migrations, models
import django.db.models.deletion
import users.validators


class Migration(migrations.Migration):

    dependencies = [
        ('clubs', '0001_initial'),
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=10, unique=True, validators=[users.validators.validate_username], verbose_name='工号')),
                ('nickname', models.CharField(max_length=20, verbose_name='老师名')),
                ('mobile', models.CharField(max_length=11, verbose_name='手机号')),
                ('club', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='clubs.Club', verbose_name='指导的社团')),
            ],
            options={
                'verbose_name': '指导老师',
                'verbose_name_plural': '指导老师',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=10, unique=True, validators=[users.validators.validate_username], verbose_name='学号')),
                ('password', models.CharField(max_length=128, verbose_name='密码')),
                ('nickname', models.CharField(max_length=30, verbose_name='学生名')),
                ('mobile', models.CharField(blank=True, max_length=11, null=True, verbose_name='手机号')),
                ('is_admin', models.BooleanField(default=False, verbose_name='是否为管理员')),
                ('admission_time', models.DateField(verbose_name='入学时间')),
                ('introduction', ckeditor.fields.RichTextField(verbose_name='简介')),
                ('icon', models.ImageField(default='default.jpeg', upload_to='media/images/users/icons')),
                ('clubs', models.ManyToManyField(to='clubs.Club', verbose_name='加入的社团')),
                ('institute', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='clubs.Institute', verbose_name='所属学院')),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
            },
        ),
        migrations.AlterField(
            model_name='admininfo',
            name='email',
            field=models.EmailField(blank=True, max_length=254, verbose_name='邮箱'),
        ),
        migrations.AlterField(
            model_name='admininfo',
            name='password',
            field=models.CharField(max_length=128, verbose_name='密码'),
        ),
        migrations.AlterField(
            model_name='admininfo',
            name='username',
            field=models.CharField(max_length=10, unique=True, validators=[users.validators.validate_username], verbose_name='学号'),
        ),
    ]
