# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2018-05-07 07:01
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 = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('bee_django_crm', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=180, verbose_name='\u73ed\u7ea7\u540d\u79f0')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('assistant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                                to=settings.AUTH_USER_MODEL, verbose_name='\u52a9\u6559')),
            ],
            options={
                'ordering': ['-created_at'],
                'db_table': 'bee_django_user_class',
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('student_id', models.IntegerField(null=True, unique=True, verbose_name='\u5b66\u53f7')),
                ('room_id',
                 models.CharField(blank=True, max_length=180, null=True, verbose_name='\u4e60\u7434\u5ba4ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('preuser',
                 models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.CRM_PREUSER,
                                      verbose_name='crm\u7528\u6237')),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE,
                                              to=settings.AUTH_USER_MODEL)),
                ('user_class', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
                                                 to='bee_django_user.UserClass',
                                                 verbose_name='\u7528\u6237\u73ed\u7ea7')),
            ],
            options={
                'ordering': ['-created_at'],
                'db_table': 'bee_django_user_profile',
                'permissions': (('user.can_manage', 'can manage'), ('user.can_change', 'can change user info'),
                                ('user.can_change_group', 'can change user group'),
                                ('user.can_delete', 'can delete user'), ('user.can_create', 'can create user'),
                                ('user.view_all', 'view all users'), ('user.view_manage', 'view manage users'),
                                ('user.view_teach', 'view teach users')),
            },
        ),
    ]
