# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2019-11-07 11:32
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Parent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', models.CharField(max_length=20, unique=True, verbose_name='电话')),
                ('username', models.CharField(default='', max_length=15, verbose_name='姓名')),
                ('pwd', models.CharField(max_length=32, verbose_name='密码')),
                ('gender', models.BooleanField(default=True, verbose_name='性别')),
                ('email', models.EmailField(default='', max_length=254, null=True, verbose_name='邮箱')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('mod_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('isActive', models.BooleanField(default=True, verbose_name='状态')),
            ],
            options={
                'verbose_name': '家长',
                'verbose_name_plural': '家长',
                'db_table': 'parent',
            },
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('school_name', models.CharField(max_length=20, unique=True, verbose_name='校区')),
                ('school_id', models.CharField(max_length=15, unique=True, verbose_name='校区编号')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('mod_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('isActive', models.BooleanField(default=True, verbose_name='状态')),
            ],
            options={
                'verbose_name': '学校',
                'verbose_name_plural': '学校',
                'db_table': 'school',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stu_id', models.CharField(max_length=15, unique=True, verbose_name='学号')),
                ('name', models.CharField(max_length=15, verbose_name='姓名')),
                ('stu_class', models.CharField(default='', max_length=20, verbose_name='班级')),
                ('age', models.CharField(max_length=5, verbose_name='年龄')),
                ('gender', models.BooleanField(default=True, verbose_name='性别')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('mod_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('isActive', models.BooleanField(default=True, verbose_name='状态')),
            ],
            options={
                'verbose_name': '学生',
                'verbose_name_plural': '学生',
                'db_table': 'student',
            },
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('teacher_name', models.CharField(max_length=15, unique=True, verbose_name='用户名')),
                ('subject', models.CharField(default='', max_length=10, verbose_name='科目')),
                ('teacher_id', models.CharField(max_length=20, unique=True, verbose_name='员工编号')),
                ('password', models.CharField(max_length=32, verbose_name='密码')),
                ('age', models.CharField(max_length=5, verbose_name='年龄')),
                ('email', models.EmailField(max_length=60, verbose_name='邮箱')),
                ('gender', models.BooleanField(default=True, verbose_name='性别')),
                ('phone', models.CharField(max_length=20, unique=True, verbose_name='电话')),
                ('isActive', models.BooleanField(default=True, verbose_name='状态')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('mod_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('school_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.School')),
            ],
            options={
                'verbose_name': '教师',
                'verbose_name_plural': '教师',
                'db_table': 'teacher',
            },
        ),
        migrations.AddField(
            model_name='student',
            name='teacher_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Teacher'),
        ),
        migrations.AddField(
            model_name='parent',
            name='stu_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Student'),
        ),
    ]
