# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-25 08:49
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('school', '0002_auto_20170123_0237'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Org',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=30, verbose_name='编码')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('createdTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updatedTime', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': 'B.家庭',
                'verbose_name_plural': 'B.家庭',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nickname', models.CharField(blank=True, max_length=20, null=True)),
                ('openid', models.CharField(blank=True, max_length=128, null=True)),
                ('role', models.CharField(choices=[('1', '家长'), ('2', '老师'), ('3', '家长/老师'), ('4', '孩子')], max_length=2, verbose_name='身份')),
                ('imgUrl', models.CharField(blank=True, max_length=128, null=True)),
                ('createdTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updatedTime', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('isHost', models.BooleanField(default=False, verbose_name='是否家主')),
                ('classGroup', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='school.ClassGroup', verbose_name='所属班级')),
                ('org', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='org.Org', verbose_name='所属家庭')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='所属用户')),
            ],
            options={
                'verbose_name': 'A.个人补充信息',
                'verbose_name_plural': 'A.个人补充信息',
            },
        ),
    ]
