# Generated by Django 2.1.3 on 2018-12-06 22:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('name', models.CharField(max_length=32, verbose_name='用户名')),
                ('email', models.EmailField(max_length=255, unique=True, verbose_name='email address')),
                ('password', models.CharField(help_text="<a class='btn-link' href='password/'>点击修改or重置密码</a>", max_length=128, verbose_name='password')),
                ('is_active', models.BooleanField(default=True, verbose_name='活动用户')),
                ('is_admin', models.BooleanField(default=False, verbose_name='超级用户')),
                ('is_staff', models.BooleanField(default=True, help_text='Designates whether the user can log into this king_admin site.', verbose_name='staff status')),
                ('memo', models.TextField(blank=True, default=None, null=True, verbose_name='备注')),
                ('date_joined', models.DateTimeField(auto_now_add=True, null=True)),
            ],
            options={
                'verbose_name_plural': 'CRM账户',
                'permissions': (('can_get_index(king_admin)', '可以访问 king_admin 首页02'), ('can_get_table_objs(king_admin)', '可以访问 king_admin 各个表02'), ('can_post_table_objs(king_admin)', '可以修改 king_admin 每个表中对象02'), ('can_get_edit_detail(king_admin)', '可以查看 king_admin 对应表详细信息02'), ('can_post_edit_detail(king_admin)', '可以修改 king_admin 对应表详细信息02'), ('can_get_change_pwd(king_admin)', '可以查看 king_admin 修改密码页面02'), ('can_post_change_pwd(king_admin)', '可以修改 king_admin 密码02'), ('can_get_obj_field_delete(king_admin)', '可以查看 king_admin 删除页面02'), ('can_post_obj_field_delete(king_admin)', '可以修改 king_admin 删除页面数据02'), ('can_get_obj_table_obj_add(king_admin)', '可以查看 king_admin 新增页面02'), ('can_post_obj_table_obj_add(king_admin)', '可以修改 king_admin 新增页面数据02'), ('can_get_index(crm)', '可以 访问 主页(crm)'), ('can_get_customer(crm)', '可以 访问 全部客户信息 页(crm)'), ('can_get_my_customers(crm)', '可以 访问 我的客户信息 页(crm)'), ('can_get_customer_add(crm)', '可以 访问 添加自己的客户信息 页(crm)'), ('can_post_customer_add(crm)', '可以 编辑 添加自己的客户信息 页(crm)'), ('can_get_my_customers_change(crm)', '可以 访问 修改自己的客户信息 页(crm)'), ('can_post_my_customers_change(crm)', '可以 编辑 修改自己的客户信息 页(crm)'), ('can_get_customer_show(crm)', '可以 访问 客户信息展示 页(crm)'), ('can_get_index(students)', '可以 访问 学生主页(students)'), ('can_get_stu_registered(students)', '可以 访问 账号注册 页(students)'), ('can_post_stu_registered(students)', '可以 编辑 账号注册 页(students)'), ('can_get_jump(students)', '可以 访问 账号注册成功跳转 页(students)'), ('can_get_classlist(students)', '可以 访问 全部班级信息 页(students)'), ('can_get_my_course(students)', '可以 访问 我的课程 页(students)'), ('can_get_payment(students)', '可以 访问 报名步骤2付款审核 页(students)'), ('can_post_payment(students)', '可以 编辑 报名步骤2付款审核 页(students)'), ('can_get_pay(students)', '可以 进入 报名步骤3付款确认 页(students)'), ('can_post_pay(students)', '可以 编辑 报名步骤3付款确认 页(students)'), ('can_get_enrollment(students)', '可以 进入 报名步骤1 页(students)'), ('can_post_enrollment(students)', '可以 编辑 报名步骤1 页(students)'), ('can_get_studyrecord(students)', '可以 访问 学习记录 页(students)'), ('can_get_index(teachers)', '可以 访问 讲师主页(teachers)'), ('can_get_my_class(teachers)', '可以 访问 我的课程 页(teachers)'), ('can_get_class_stu_list(teachers)', '可以 访问 学生学习记录 页(teachers)')),
            },
        ),
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True, verbose_name='校区')),
                ('addr', models.CharField(max_length=128, verbose_name='地址')),
            ],
            options={
                'verbose_name_plural': '校区表',
            },
        ),
        migrations.CreateModel(
            name='ClassList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('class_type', models.SmallIntegerField(choices=[(0, '面授(脱产)'), (1, '面授(周末)'), (2, '网络班')], verbose_name='班级类型')),
                ('total_class_nums', models.PositiveIntegerField(default=10, verbose_name='课程总节次')),
                ('semester', models.PositiveSmallIntegerField(verbose_name='学期')),
                ('price', models.IntegerField(default=5000, verbose_name='学费')),
                ('start_date', models.DateField(verbose_name='开班日期')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='结业日期')),
                ('branch', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Branch', verbose_name='校区')),
            ],
            options={
                'verbose_name_plural': '班级表',
            },
        ),
        migrations.CreateModel(
            name='ContractTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, verbose_name='合同名称')),
                ('template', models.TextField()),
            ],
            options={
                'verbose_name_plural': '合同表',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True, verbose_name='课程名')),
                ('description', models.TextField(verbose_name='课程描述')),
                ('period', models.PositiveSmallIntegerField(verbose_name='周期(月)')),
                ('outline', models.TextField(verbose_name='课程描述')),
            ],
            options={
                'verbose_name_plural': '课程表',
            },
        ),
        migrations.CreateModel(
            name='CourseRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day_num', models.PositiveSmallIntegerField(help_text='此处填写第几节课或第几天课程...,必须为数字', verbose_name='第几节(天)')),
                ('has_homework', models.CharField(blank=True, max_length=128, null=True, verbose_name='作业')),
                ('homework_content', models.TextField(verbose_name='本节课程作业')),
                ('date', models.DateField(auto_now_add=True, verbose_name='上课日期')),
                ('from_class', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.ClassList', verbose_name='班级(课程)')),
                ('teacher', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='老师')),
            ],
            options={
                'verbose_name_plural': '上课记录',
            },
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=32, null=True, verbose_name='姓名')),
                ('qq', models.CharField(blank=True, max_length=64, null=True, unique=True)),
                ('qq_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='QQ昵称')),
                ('phone', models.CharField(blank=True, max_length=64, null=True, verbose_name='联系电话')),
                ('source', models.SmallIntegerField(choices=[(0, '转介绍'), (1, 'QQ群'), (2, '官网'), (3, '百度推广'), (4, '51CTO'), (5, '知乎'), (6, '市场推广')], default=0, verbose_name='客户来源')),
                ('content', models.TextField(verbose_name='咨询详情')),
                ('id_num', models.CharField(blank=True, max_length=64, null=True, verbose_name='身份证')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, unique=True, verbose_name='常用邮箱')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='日期')),
                ('status', models.SmallIntegerField(choices=[(0, '未报名'), (1, '已报名')], default=0, verbose_name='报名情况')),
                ('consult_course', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Course', verbose_name='咨询课程')),
                ('consultant', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='跟进人')),
                ('referral_from', models.ForeignKey(blank=True, help_text='若介绍人是内部学员,请在此处选择内部学员姓名', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='internal_referral', to='crm.Customer', verbose_name='转介绍人')),
            ],
            options={
                'verbose_name_plural': '客户信息表',
            },
        ),
        migrations.CreateModel(
            name='CustomerFollowUp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(verbose_name='跟进内容')),
                ('intention', models.SmallIntegerField(choices=[(0, '2周内报名'), (1, '1个月内报名'), (2, '近期无报名计划'), (3, '已在其他机构报名'), (4, '未报名'), (5, '已报名'), (6, '已拉黑')], verbose_name='跟踪情况')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('consultant', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='跟进人')),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='咨询客户跟踪')),
            ],
            options={
                'verbose_name_plural': '客户跟进记录',
            },
        ),
        migrations.CreateModel(
            name='Enrollment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enrolled_date', models.DateTimeField(auto_created=True, auto_now_add=True, verbose_name='报名日期')),
                ('your_expectation', models.TextField(blank=True, max_length=1024, null=True, verbose_name='学完想达到的具体期望')),
                ('contract_agreed', models.BooleanField(default=False, help_text='我已认真阅读完培训协议并同意全部协议内容', verbose_name='是否同意协议')),
                ('contract_approved', models.BooleanField(default=False, help_text='在审阅完学员的资料无误后勾选此项,合同即生效', verbose_name='审核通过')),
                ('memo', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('consultant', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='课程顾问')),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='客户')),
                ('enrolled_class', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.ClassList', verbose_name='所报班级')),
                ('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Branch', verbose_name='校区')),
            ],
            options={
                'verbose_name_plural': '报名表',
            },
        ),
        migrations.CreateModel(
            name='FirstLayerMenu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='菜单名')),
                ('url_type', models.SmallIntegerField(choices=[(0, 'related_name'), (1, 'absolute_url')], default=0)),
                ('url_name', models.CharField(max_length=64, unique=True)),
                ('order', models.SmallIntegerField(default=0, verbose_name='菜单排序')),
            ],
            options={
                'verbose_name_plural': '第一层菜单',
            },
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pay_type', models.CharField(blank=True, choices=[('deposit', '订金/报名费'), ('tution', '学费'), ('refund', '退款')], default='tution', max_length=64, null=True, verbose_name='费用类型')),
                ('amount', models.PositiveSmallIntegerField(default=0, verbose_name='金额')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='交款日期')),
                ('note', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Course', verbose_name='所报课程')),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='客户')),
                ('enrollment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Enrollment')),
            ],
            options={
                'verbose_name_plural': '缴费记录',
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True, verbose_name='角色')),
                ('menus', models.ManyToManyField(blank=True, to='crm.FirstLayerMenu')),
            ],
            options={
                'verbose_name_plural': '角色',
            },
        ),
        migrations.CreateModel(
            name='StuAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128)),
                ('valid_start', models.DateTimeField(blank=True, null=True, verbose_name='账户有效期开始')),
                ('valid_end', models.DateTimeField(blank=True, null=True, verbose_name='账户有效期截止')),
                ('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='crm.Customer')),
            ],
        ),
        migrations.CreateModel(
            name='StudyRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attendance', models.SmallIntegerField(choices=[(0, '已签到'), (1, '迟到'), (2, '缺勤'), (3, '早退')], default=0, verbose_name='签到情况')),
                ('score', models.SmallIntegerField(choices=[(100, 'A+'), (90, 'A'), (85, 'B+'), (80, 'B'), (75, 'B-'), (70, 'C+'), (60, 'C'), (40, 'C-'), (-50, 'D'), (100, 'COPY'), (0, 'N/A')], default=0, verbose_name='本节成绩')),
                ('date', models.DateField(auto_now_add=True, verbose_name='日期')),
                ('note', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('course_record', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.CourseRecord', verbose_name='课程记录')),
                ('student', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='学员')),
            ],
            options={
                'verbose_name_plural': '学习记录表',
            },
        ),
        migrations.CreateModel(
            name='SubMenu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='二层菜单名')),
                ('url_type', models.SmallIntegerField(choices=[(0, 'related_name'), (1, 'absolute_url')], default=0)),
                ('url_name', models.CharField(max_length=64, unique=True)),
                ('order', models.SmallIntegerField(default=0, verbose_name='菜单排序')),
            ],
            options={
                'verbose_name_plural': '第二层菜单',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True, verbose_name='头衔')),
            ],
            options={
                'verbose_name_plural': '职业状态',
            },
        ),
        migrations.AddField(
            model_name='firstlayermenu',
            name='sub_menus',
            field=models.ManyToManyField(blank=True, to='crm.SubMenu'),
        ),
        migrations.AddField(
            model_name='customer',
            name='tag',
            field=models.ManyToManyField(blank=True, default=None, null=True, to='crm.Tag', verbose_name='职业状态'),
        ),
        migrations.AddField(
            model_name='classlist',
            name='contract',
            field=models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.ContractTemplate', verbose_name='合同'),
        ),
        migrations.AddField(
            model_name='classlist',
            name='course',
            field=models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Course', verbose_name='课程'),
        ),
        migrations.AddField(
            model_name='classlist',
            name='teachers',
            field=models.ManyToManyField(blank=True, null=True, to=settings.AUTH_USER_MODEL, verbose_name='上课讲师'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='branch',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Branch', verbose_name='所属校区'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='groups',
            field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='roles',
            field=models.ManyToManyField(blank=True, to='crm.Role', verbose_name='角色'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
        migrations.AlterUniqueTogether(
            name='studyrecord',
            unique_together={('student', 'course_record')},
        ),
        migrations.AlterUniqueTogether(
            name='enrollment',
            unique_together={('customer', 'enrolled_class')},
        ),
        migrations.AlterUniqueTogether(
            name='courserecord',
            unique_together={('from_class', 'day_num')},
        ),
        migrations.AlterUniqueTogether(
            name='classlist',
            unique_together={('course', 'semester')},
        ),
    ]

9ca7761a9ce81c11bacde8d20f9ab3551f50636c
<mask token>

<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    initial = True
    dependencies = [('auth', '0009_alter_user_last_name_max_length')]
    operations = [migrations.CreateModel(name='UserProfile', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('last_login', models.DateTimeField(
        blank=True, null=True, verbose_name='last login')), ('name', models
        .CharField(max_length=32, verbose_name='用户名')), ('email', models.
        EmailField(max_length=255, unique=True, verbose_name=
        'email address')), ('password', models.CharField(help_text=
        "<a class='btn-link' href='password/'>点击修改or重置密码</a>", max_length=
        128, verbose_name='password')), ('is_active', models.BooleanField(
        default=True, verbose_name='活动用户')), ('is_admin', models.
        BooleanField(default=False, verbose_name='超级用户')), ('is_staff',
        models.BooleanField(default=True, help_text=
        'Designates whether the user can log into this king_admin site.',
        verbose_name='staff status')), ('memo', models.TextField(blank=True,
        default=None, null=True, verbose_name='备注')), ('date_joined',
        models.DateTimeField(auto_now_add=True, null=True))], options={
        'verbose_name_plural': 'CRM账户', 'permissions': ((
        'can_get_index(king_admin)', '可以访问 king_admin 首页02'), (
        'can_get_table_objs(king_admin)', '可以访问 king_admin 各个表02'), (
        'can_post_table_objs(king_admin)', '可以修改 king_admin 每个表中对象02'), (
        'can_get_edit_detail(king_admin)', '可以查看 king_admin 对应表详细信息02'), (
        'can_post_edit_detail(king_admin)', '可以修改 king_admin 对应表详细信息02'), (
        'can_get_change_pwd(king_admin)', '可以查看 king_admin 修改密码页面02'), (
        'can_post_change_pwd(king_admin)', '可以修改 king_admin 密码02'), (
        'can_get_obj_field_delete(king_admin)', '可以查看 king_admin 删除页面02'),
        ('can_post_obj_field_delete(king_admin)',
        '可以修改 king_admin 删除页面数据02'), (
        'can_get_obj_table_obj_add(king_admin)', '可以查看 king_admin 新增页面02'),
        ('can_post_obj_table_obj_add(king_admin)',
        '可以修改 king_admin 新增页面数据02'), ('can_get_index(crm)', '可以 访问 主页(crm)'
        ), ('can_get_customer(crm)', '可以 访问 全部客户信息 页(crm)'), (
        'can_get_my_customers(crm)', '可以 访问 我的客户信息 页(crm)'), (
        'can_get_customer_add(crm)', '可以 访问 添加自己的客户信息 页(crm)'), (
        'can_post_customer_add(crm)', '可以 编辑 添加自己的客户信息 页(crm)'), (
        'can_get_my_customers_change(crm)', '可以 访问 修改自己的客户信息 页(crm)'), (
        'can_post_my_customers_change(crm)', '可以 编辑 修改自己的客户信息 页(crm)'), (
        'can_get_customer_show(crm)', '可以 访问 客户信息展示 页(crm)'), (
        'can_get_index(students)', '可以 访问 学生主页(students)'), (
        'can_get_stu_registered(students)', '可以 访问 账号注册 页(students)'), (
        'can_post_stu_registered(students)', '可以 编辑 账号注册 页(students)'), (
        'can_get_jump(students)', '可以 访问 账号注册成功跳转 页(students)'), (
        'can_get_classlist(students)', '可以 访问 全部班级信息 页(students)'), (
        'can_get_my_course(students)', '可以 访问 我的课程 页(students)'), (
        'can_get_payment(students)', '可以 访问 报名步骤2付款审核 页(students)'), (
        'can_post_payment(students)', '可以 编辑 报名步骤2付款审核 页(students)'), (
        'can_get_pay(students)', '可以 进入 报名步骤3付款确认 页(students)'), (
        'can_post_pay(students)', '可以 编辑 报名步骤3付款确认 页(students)'), (
        'can_get_enrollment(students)', '可以 进入 报名步骤1 页(students)'), (
        'can_post_enrollment(students)', '可以 编辑 报名步骤1 页(students)'), (
        'can_get_studyrecord(students)', '可以 访问 学习记录 页(students)'), (
        'can_get_index(teachers)', '可以 访问 讲师主页(teachers)'), (
        'can_get_my_class(teachers)', '可以 访问 我的课程 页(teachers)'), (
        'can_get_class_stu_list(teachers)', '可以 访问 学生学习记录 页(teachers)'))}),
        migrations.CreateModel(name='Branch', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('name', models.CharField(max_length=128,
        unique=True, verbose_name='校区')), ('addr', models.CharField(
        max_length=128, verbose_name='地址'))], options={
        'verbose_name_plural': '校区表'}), migrations.CreateModel(name=
        'ClassList', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), (
        'class_type', models.SmallIntegerField(choices=[(0, '面授(脱产)'), (1,
        '面授(周末)'), (2, '网络班')], verbose_name='班级类型')), ('total_class_nums',
        models.PositiveIntegerField(default=10, verbose_name='课程总节次')), (
        'semester', models.PositiveSmallIntegerField(verbose_name='学期')), (
        'price', models.IntegerField(default=5000, verbose_name='学费')), (
        'start_date', models.DateField(verbose_name='开班日期')), ('end_date',
        models.DateField(blank=True, null=True, verbose_name='结业日期')), (
        'branch', models.ForeignKey(blank=True, null=True, on_delete=None,
        to='crm.Branch', verbose_name='校区'))], options={
        'verbose_name_plural': '班级表'}), migrations.CreateModel(name=
        'ContractTemplate', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'name', models.CharField(max_length=32, verbose_name='合同名称')), (
        'template', models.TextField())], options={'verbose_name_plural':
        '合同表'}), migrations.CreateModel(name='Course', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=64,
        unique=True, verbose_name='课程名')), ('description', models.TextField
        (verbose_name='课程描述')), ('period', models.PositiveSmallIntegerField
        (verbose_name='周期(月)')), ('outline', models.TextField(verbose_name=
        '课程描述'))], options={'verbose_name_plural': '课程表'}), migrations.
        CreateModel(name='CourseRecord', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('day_num', models.PositiveSmallIntegerField(help_text=
        '此处填写第几节课或第几天课程...,必须为数字', verbose_name='第几节(天)')), ('has_homework',
        models.CharField(blank=True, max_length=128, null=True,
        verbose_name='作业')), ('homework_content', models.TextField(
        verbose_name='本节课程作业')), ('date', models.DateField(auto_now_add=
        True, verbose_name='上课日期')), ('from_class', models.ForeignKey(blank
        =True, null=True, on_delete=None, to='crm.ClassList', verbose_name=
        '班级(课程)')), ('teacher', models.ForeignKey(blank=True, null=True,
        on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='老师'))],
        options={'verbose_name_plural': '上课记录'}), migrations.CreateModel(
        name='Customer', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('name',
        models.CharField(blank=True, max_length=32, null=True, verbose_name
        ='姓名')), ('qq', models.CharField(blank=True, max_length=64, null=
        True, unique=True)), ('qq_name', models.CharField(blank=True,
        max_length=64, null=True, verbose_name='QQ昵称')), ('phone', models.
        CharField(blank=True, max_length=64, null=True, verbose_name='联系电话'
        )), ('source', models.SmallIntegerField(choices=[(0, '转介绍'), (1,
        'QQ群'), (2, '官网'), (3, '百度推广'), (4, '51CTO'), (5, '知乎'), (6, '市场推广'
        )], default=0, verbose_name='客户来源')), ('content', models.TextField(
        verbose_name='咨询详情')), ('id_num', models.CharField(blank=True,
        max_length=64, null=True, verbose_name='身份证')), ('email', models.
        EmailField(blank=True, max_length=254, null=True, unique=True,
        verbose_name='常用邮箱')), ('date', models.DateTimeField(auto_now_add=
        True, verbose_name='日期')), ('status', models.SmallIntegerField(
        choices=[(0, '未报名'), (1, '已报名')], default=0, verbose_name='报名情况')),
        ('consult_course', models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.Course', verbose_name='咨询课程')), (
        'consultant', models.ForeignKey(blank=True, null=True, on_delete=
        None, to=settings.AUTH_USER_MODEL, verbose_name='跟进人')), (
        'referral_from', models.ForeignKey(blank=True, help_text=
        '若介绍人是内部学员,请在此处选择内部学员姓名', null=True, on_delete=django.db.models.
        deletion.CASCADE, related_name='internal_referral', to=
        'crm.Customer', verbose_name='转介绍人'))], options={
        'verbose_name_plural': '客户信息表'}), migrations.CreateModel(name=
        'CustomerFollowUp', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'content', models.TextField(verbose_name='跟进内容')), ('intention',
        models.SmallIntegerField(choices=[(0, '2周内报名'), (1, '1个月内报名'), (2,
        '近期无报名计划'), (3, '已在其他机构报名'), (4, '未报名'), (5, '已报名'), (6, '已拉黑')],
        verbose_name='跟踪情况')), ('date', models.DateTimeField(auto_now_add=
        True, verbose_name='时间')), ('consultant', models.ForeignKey(blank=
        True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL,
        verbose_name='跟进人')), ('customer', models.ForeignKey(blank=True,
        null=True, on_delete=None, to='crm.Customer', verbose_name='咨询客户跟踪'
        ))], options={'verbose_name_plural': '客户跟进记录'}), migrations.
        CreateModel(name='Enrollment', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('enrolled_date', models.DateTimeField(auto_created=True,
        auto_now_add=True, verbose_name='报名日期')), ('your_expectation',
        models.TextField(blank=True, max_length=1024, null=True,
        verbose_name='学完想达到的具体期望')), ('contract_agreed', models.
        BooleanField(default=False, help_text='我已认真阅读完培训协议并同意全部协议内容',
        verbose_name='是否同意协议')), ('contract_approved', models.BooleanField(
        default=False, help_text='在审阅完学员的资料无误后勾选此项,合同即生效', verbose_name=
        '审核通过')), ('memo', models.TextField(blank=True, null=True,
        verbose_name='备注')), ('consultant', models.ForeignKey(blank=True,
        null=True, on_delete=None, to=settings.AUTH_USER_MODEL,
        verbose_name='课程顾问')), ('customer', models.ForeignKey(blank=True,
        null=True, on_delete=None, to='crm.Customer', verbose_name='客户')),
        ('enrolled_class', models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.ClassList', verbose_name='所报班级')), (
        'school', models.ForeignKey(blank=True, null=True, on_delete=django
        .db.models.deletion.CASCADE, to='crm.Branch', verbose_name='校区'))],
        options={'verbose_name_plural': '报名表'}), migrations.CreateModel(
        name='FirstLayerMenu', fields=[('id', models.AutoField(auto_created
        =True, primary_key=True, serialize=False, verbose_name='ID')), (
        'name', models.CharField(max_length=64, verbose_name='菜单名')), (
        'url_type', models.SmallIntegerField(choices=[(0, 'related_name'),
        (1, 'absolute_url')], default=0)), ('url_name', models.CharField(
        max_length=64, unique=True)), ('order', models.SmallIntegerField(
        default=0, verbose_name='菜单排序'))], options={'verbose_name_plural':
        '第一层菜单'}), migrations.CreateModel(name='Payment', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('pay_type', models.CharField(blank=
        True, choices=[('deposit', '订金/报名费'), ('tution', '学费'), ('refund',
        '退款')], default='tution', max_length=64, null=True, verbose_name=
        '费用类型')), ('amount', models.PositiveSmallIntegerField(default=0,
        verbose_name='金额')), ('date', models.DateTimeField(auto_now_add=
        True, verbose_name='交款日期')), ('note', models.TextField(blank=True,
        null=True, verbose_name='备注')), ('course', models.ForeignKey(blank=
        True, null=True, on_delete=django.db.models.deletion.CASCADE, to=
        'crm.Course', verbose_name='所报课程')), ('customer', models.ForeignKey
        (blank=True, null=True, on_delete=None, to='crm.Customer',
        verbose_name='客户')), ('enrollment', models.ForeignKey(blank=True,
        null=True, on_delete=django.db.models.deletion.CASCADE, to=
        'crm.Enrollment'))], options={'verbose_name_plural': '缴费记录'}),
        migrations.CreateModel(name='Role', fields=[('id', models.AutoField
        (auto_created=True, primary_key=True, serialize=False, verbose_name
        ='ID')), ('name', models.CharField(max_length=32, unique=True,
        verbose_name='角色')), ('menus', models.ManyToManyField(blank=True,
        to='crm.FirstLayerMenu'))], options={'verbose_name_plural': '角色'}),
        migrations.CreateModel(name='StuAccount', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('password', models.CharField(max_length=128)),
        ('valid_start', models.DateTimeField(blank=True, null=True,
        verbose_name='账户有效期开始')), ('valid_end', models.DateTimeField(blank=
        True, null=True, verbose_name='账户有效期截止')), ('account', models.
        OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=
        'crm.Customer'))]), migrations.CreateModel(name='StudyRecord',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('attendance', models.
        SmallIntegerField(choices=[(0, '已签到'), (1, '迟到'), (2, '缺勤'), (3,
        '早退')], default=0, verbose_name='签到情况')), ('score', models.
        SmallIntegerField(choices=[(100, 'A+'), (90, 'A'), (85, 'B+'), (80,
        'B'), (75, 'B-'), (70, 'C+'), (60, 'C'), (40, 'C-'), (-50, 'D'), (
        100, 'COPY'), (0, 'N/A')], default=0, verbose_name='本节成绩')), (
        'date', models.DateField(auto_now_add=True, verbose_name='日期')), (
        'note', models.TextField(blank=True, null=True, verbose_name='备注')),
        ('course_record', models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.CourseRecord', verbose_name='课程记录')), (
        'student', models.ForeignKey(blank=True, null=True, on_delete=None,
        to='crm.Customer', verbose_name='学员'))], options={
        'verbose_name_plural': '学习记录表'}), migrations.CreateModel(name=
        'SubMenu', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('name',
        models.CharField(max_length=64, verbose_name='二层菜单名')), ('url_type',
        models.SmallIntegerField(choices=[(0, 'related_name'), (1,
        'absolute_url')], default=0)), ('url_name', models.CharField(
        max_length=64, unique=True)), ('order', models.SmallIntegerField(
        default=0, verbose_name='菜单排序'))], options={'verbose_name_plural':
        '第二层菜单'}), migrations.CreateModel(name='Tag', fields=[('id', models
        .AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('name', models.CharField(max_length=32,
        unique=True, verbose_name='头衔'))], options={'verbose_name_plural':
        '职业状态'}), migrations.AddField(model_name='firstlayermenu', name=
        'sub_menus', field=models.ManyToManyField(blank=True, to=
        'crm.SubMenu')), migrations.AddField(model_name='customer', name=
        'tag', field=models.ManyToManyField(blank=True, default=None, null=
        True, to='crm.Tag', verbose_name='职业状态')), migrations.AddField(
        model_name='classlist', name='contract', field=models.ForeignKey(
        blank=True, null=True, on_delete=None, to='crm.ContractTemplate',
        verbose_name='合同')), migrations.AddField(model_name='classlist',
        name='course', field=models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.Course', verbose_name='课程')), migrations.
        AddField(model_name='classlist', name='teachers', field=models.
        ManyToManyField(blank=True, null=True, to=settings.AUTH_USER_MODEL,
        verbose_name='上课讲师')), migrations.AddField(model_name='userprofile',
        name='branch', field=models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.CASCADE, to='crm.Branch',
        verbose_name='所属校区')), migrations.AddField(model_name='userprofile',
        name='groups', field=models.ManyToManyField(blank=True, help_text=
        'The groups this user belongs to. A user will get all permissions granted to each of their groups.'
        , related_name='user_set', related_query_name='user', to=
        'auth.Group', verbose_name='groups')), migrations.AddField(
        model_name='userprofile', name='roles', field=models.
        ManyToManyField(blank=True, to='crm.Role', verbose_name='角色')),
        migrations.AddField(model_name='userprofile', name=
        'user_permissions', field=models.ManyToManyField(blank=True,
        help_text='Specific permissions for this user.', related_name=
        'user_set', related_query_name='user', to='auth.Permission',
        verbose_name='user permissions')), migrations.AlterUniqueTogether(
        name='studyrecord', unique_together={('student', 'course_record')}),
        migrations.AlterUniqueTogether(name='enrollment', unique_together={
        ('customer', 'enrolled_class')}), migrations.AlterUniqueTogether(
        name='courserecord', unique_together={('from_class', 'day_num')}),
        migrations.AlterUniqueTogether(name='classlist', unique_together={(
        'course', 'semester')})]

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


class Migration(migrations.Migration):
    initial = True
    dependencies = [('auth', '0009_alter_user_last_name_max_length')]
    operations = [migrations.CreateModel(name='UserProfile', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('last_login', models.DateTimeField(
        blank=True, null=True, verbose_name='last login')), ('name', models
        .CharField(max_length=32, verbose_name='用户名')), ('email', models.
        EmailField(max_length=255, unique=True, verbose_name=
        'email address')), ('password', models.CharField(help_text=
        "<a class='btn-link' href='password/'>点击修改or重置密码</a>", max_length=
        128, verbose_name='password')), ('is_active', models.BooleanField(
        default=True, verbose_name='活动用户')), ('is_admin', models.
        BooleanField(default=False, verbose_name='超级用户')), ('is_staff',
        models.BooleanField(default=True, help_text=
        'Designates whether the user can log into this king_admin site.',
        verbose_name='staff status')), ('memo', models.TextField(blank=True,
        default=None, null=True, verbose_name='备注')), ('date_joined',
        models.DateTimeField(auto_now_add=True, null=True))], options={
        'verbose_name_plural': 'CRM账户', 'permissions': ((
        'can_get_index(king_admin)', '可以访问 king_admin 首页02'), (
        'can_get_table_objs(king_admin)', '可以访问 king_admin 各个表02'), (
        'can_post_table_objs(king_admin)', '可以修改 king_admin 每个表中对象02'), (
        'can_get_edit_detail(king_admin)', '可以查看 king_admin 对应表详细信息02'), (
        'can_post_edit_detail(king_admin)', '可以修改 king_admin 对应表详细信息02'), (
        'can_get_change_pwd(king_admin)', '可以查看 king_admin 修改密码页面02'), (
        'can_post_change_pwd(king_admin)', '可以修改 king_admin 密码02'), (
        'can_get_obj_field_delete(king_admin)', '可以查看 king_admin 删除页面02'),
        ('can_post_obj_field_delete(king_admin)',
        '可以修改 king_admin 删除页面数据02'), (
        'can_get_obj_table_obj_add(king_admin)', '可以查看 king_admin 新增页面02'),
        ('can_post_obj_table_obj_add(king_admin)',
        '可以修改 king_admin 新增页面数据02'), ('can_get_index(crm)', '可以 访问 主页(crm)'
        ), ('can_get_customer(crm)', '可以 访问 全部客户信息 页(crm)'), (
        'can_get_my_customers(crm)', '可以 访问 我的客户信息 页(crm)'), (
        'can_get_customer_add(crm)', '可以 访问 添加自己的客户信息 页(crm)'), (
        'can_post_customer_add(crm)', '可以 编辑 添加自己的客户信息 页(crm)'), (
        'can_get_my_customers_change(crm)', '可以 访问 修改自己的客户信息 页(crm)'), (
        'can_post_my_customers_change(crm)', '可以 编辑 修改自己的客户信息 页(crm)'), (
        'can_get_customer_show(crm)', '可以 访问 客户信息展示 页(crm)'), (
        'can_get_index(students)', '可以 访问 学生主页(students)'), (
        'can_get_stu_registered(students)', '可以 访问 账号注册 页(students)'), (
        'can_post_stu_registered(students)', '可以 编辑 账号注册 页(students)'), (
        'can_get_jump(students)', '可以 访问 账号注册成功跳转 页(students)'), (
        'can_get_classlist(students)', '可以 访问 全部班级信息 页(students)'), (
        'can_get_my_course(students)', '可以 访问 我的课程 页(students)'), (
        'can_get_payment(students)', '可以 访问 报名步骤2付款审核 页(students)'), (
        'can_post_payment(students)', '可以 编辑 报名步骤2付款审核 页(students)'), (
        'can_get_pay(students)', '可以 进入 报名步骤3付款确认 页(students)'), (
        'can_post_pay(students)', '可以 编辑 报名步骤3付款确认 页(students)'), (
        'can_get_enrollment(students)', '可以 进入 报名步骤1 页(students)'), (
        'can_post_enrollment(students)', '可以 编辑 报名步骤1 页(students)'), (
        'can_get_studyrecord(students)', '可以 访问 学习记录 页(students)'), (
        'can_get_index(teachers)', '可以 访问 讲师主页(teachers)'), (
        'can_get_my_class(teachers)', '可以 访问 我的课程 页(teachers)'), (
        'can_get_class_stu_list(teachers)', '可以 访问 学生学习记录 页(teachers)'))}),
        migrations.CreateModel(name='Branch', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('name', models.CharField(max_length=128,
        unique=True, verbose_name='校区')), ('addr', models.CharField(
        max_length=128, verbose_name='地址'))], options={
        'verbose_name_plural': '校区表'}), migrations.CreateModel(name=
        'ClassList', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), (
        'class_type', models.SmallIntegerField(choices=[(0, '面授(脱产)'), (1,
        '面授(周末)'), (2, '网络班')], verbose_name='班级类型')), ('total_class_nums',
        models.PositiveIntegerField(default=10, verbose_name='课程总节次')), (
        'semester', models.PositiveSmallIntegerField(verbose_name='学期')), (
        'price', models.IntegerField(default=5000, verbose_name='学费')), (
        'start_date', models.DateField(verbose_name='开班日期')), ('end_date',
        models.DateField(blank=True, null=True, verbose_name='结业日期')), (
        'branch', models.ForeignKey(blank=True, null=True, on_delete=None,
        to='crm.Branch', verbose_name='校区'))], options={
        'verbose_name_plural': '班级表'}), migrations.CreateModel(name=
        'ContractTemplate', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'name', models.CharField(max_length=32, verbose_name='合同名称')), (
        'template', models.TextField())], options={'verbose_name_plural':
        '合同表'}), migrations.CreateModel(name='Course', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=64,
        unique=True, verbose_name='课程名')), ('description', models.TextField
        (verbose_name='课程描述')), ('period', models.PositiveSmallIntegerField
        (verbose_name='周期(月)')), ('outline', models.TextField(verbose_name=
        '课程描述'))], options={'verbose_name_plural': '课程表'}), migrations.
        CreateModel(name='CourseRecord', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('day_num', models.PositiveSmallIntegerField(help_text=
        '此处填写第几节课或第几天课程...,必须为数字', verbose_name='第几节(天)')), ('has_homework',
        models.CharField(blank=True, max_length=128, null=True,
        verbose_name='作业')), ('homework_content', models.TextField(
        verbose_name='本节课程作业')), ('date', models.DateField(auto_now_add=
        True, verbose_name='上课日期')), ('from_class', models.ForeignKey(blank
        =True, null=True, on_delete=None, to='crm.ClassList', verbose_name=
        '班级(课程)')), ('teacher', models.ForeignKey(blank=True, null=True,
        on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='老师'))],
        options={'verbose_name_plural': '上课记录'}), migrations.CreateModel(
        name='Customer', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('name',
        models.CharField(blank=True, max_length=32, null=True, verbose_name
        ='姓名')), ('qq', models.CharField(blank=True, max_length=64, null=
        True, unique=True)), ('qq_name', models.CharField(blank=True,
        max_length=64, null=True, verbose_name='QQ昵称')), ('phone', models.
        CharField(blank=True, max_length=64, null=True, verbose_name='联系电话'
        )), ('source', models.SmallIntegerField(choices=[(0, '转介绍'), (1,
        'QQ群'), (2, '官网'), (3, '百度推广'), (4, '51CTO'), (5, '知乎'), (6, '市场推广'
        )], default=0, verbose_name='客户来源')), ('content', models.TextField(
        verbose_name='咨询详情')), ('id_num', models.CharField(blank=True,
        max_length=64, null=True, verbose_name='身份证')), ('email', models.
        EmailField(blank=True, max_length=254, null=True, unique=True,
        verbose_name='常用邮箱')), ('date', models.DateTimeField(auto_now_add=
        True, verbose_name='日期')), ('status', models.SmallIntegerField(
        choices=[(0, '未报名'), (1, '已报名')], default=0, verbose_name='报名情况')),
        ('consult_course', models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.Course', verbose_name='咨询课程')), (
        'consultant', models.ForeignKey(blank=True, null=True, on_delete=
        None, to=settings.AUTH_USER_MODEL, verbose_name='跟进人')), (
        'referral_from', models.ForeignKey(blank=True, help_text=
        '若介绍人是内部学员,请在此处选择内部学员姓名', null=True, on_delete=django.db.models.
        deletion.CASCADE, related_name='internal_referral', to=
        'crm.Customer', verbose_name='转介绍人'))], options={
        'verbose_name_plural': '客户信息表'}), migrations.CreateModel(name=
        'CustomerFollowUp', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'content', models.TextField(verbose_name='跟进内容')), ('intention',
        models.SmallIntegerField(choices=[(0, '2周内报名'), (1, '1个月内报名'), (2,
        '近期无报名计划'), (3, '已在其他机构报名'), (4, '未报名'), (5, '已报名'), (6, '已拉黑')],
        verbose_name='跟踪情况')), ('date', models.DateTimeField(auto_now_add=
        True, verbose_name='时间')), ('consultant', models.ForeignKey(blank=
        True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL,
        verbose_name='跟进人')), ('customer', models.ForeignKey(blank=True,
        null=True, on_delete=None, to='crm.Customer', verbose_name='咨询客户跟踪'
        ))], options={'verbose_name_plural': '客户跟进记录'}), migrations.
        CreateModel(name='Enrollment', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('enrolled_date', models.DateTimeField(auto_created=True,
        auto_now_add=True, verbose_name='报名日期')), ('your_expectation',
        models.TextField(blank=True, max_length=1024, null=True,
        verbose_name='学完想达到的具体期望')), ('contract_agreed', models.
        BooleanField(default=False, help_text='我已认真阅读完培训协议并同意全部协议内容',
        verbose_name='是否同意协议')), ('contract_approved', models.BooleanField(
        default=False, help_text='在审阅完学员的资料无误后勾选此项,合同即生效', verbose_name=
        '审核通过')), ('memo', models.TextField(blank=True, null=True,
        verbose_name='备注')), ('consultant', models.ForeignKey(blank=True,
        null=True, on_delete=None, to=settings.AUTH_USER_MODEL,
        verbose_name='课程顾问')), ('customer', models.ForeignKey(blank=True,
        null=True, on_delete=None, to='crm.Customer', verbose_name='客户')),
        ('enrolled_class', models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.ClassList', verbose_name='所报班级')), (
        'school', models.ForeignKey(blank=True, null=True, on_delete=django
        .db.models.deletion.CASCADE, to='crm.Branch', verbose_name='校区'))],
        options={'verbose_name_plural': '报名表'}), migrations.CreateModel(
        name='FirstLayerMenu', fields=[('id', models.AutoField(auto_created
        =True, primary_key=True, serialize=False, verbose_name='ID')), (
        'name', models.CharField(max_length=64, verbose_name='菜单名')), (
        'url_type', models.SmallIntegerField(choices=[(0, 'related_name'),
        (1, 'absolute_url')], default=0)), ('url_name', models.CharField(
        max_length=64, unique=True)), ('order', models.SmallIntegerField(
        default=0, verbose_name='菜单排序'))], options={'verbose_name_plural':
        '第一层菜单'}), migrations.CreateModel(name='Payment', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('pay_type', models.CharField(blank=
        True, choices=[('deposit', '订金/报名费'), ('tution', '学费'), ('refund',
        '退款')], default='tution', max_length=64, null=True, verbose_name=
        '费用类型')), ('amount', models.PositiveSmallIntegerField(default=0,
        verbose_name='金额')), ('date', models.DateTimeField(auto_now_add=
        True, verbose_name='交款日期')), ('note', models.TextField(blank=True,
        null=True, verbose_name='备注')), ('course', models.ForeignKey(blank=
        True, null=True, on_delete=django.db.models.deletion.CASCADE, to=
        'crm.Course', verbose_name='所报课程')), ('customer', models.ForeignKey
        (blank=True, null=True, on_delete=None, to='crm.Customer',
        verbose_name='客户')), ('enrollment', models.ForeignKey(blank=True,
        null=True, on_delete=django.db.models.deletion.CASCADE, to=
        'crm.Enrollment'))], options={'verbose_name_plural': '缴费记录'}),
        migrations.CreateModel(name='Role', fields=[('id', models.AutoField
        (auto_created=True, primary_key=True, serialize=False, verbose_name
        ='ID')), ('name', models.CharField(max_length=32, unique=True,
        verbose_name='角色')), ('menus', models.ManyToManyField(blank=True,
        to='crm.FirstLayerMenu'))], options={'verbose_name_plural': '角色'}),
        migrations.CreateModel(name='StuAccount', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('password', models.CharField(max_length=128)),
        ('valid_start', models.DateTimeField(blank=True, null=True,
        verbose_name='账户有效期开始')), ('valid_end', models.DateTimeField(blank=
        True, null=True, verbose_name='账户有效期截止')), ('account', models.
        OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=
        'crm.Customer'))]), migrations.CreateModel(name='StudyRecord',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('attendance', models.
        SmallIntegerField(choices=[(0, '已签到'), (1, '迟到'), (2, '缺勤'), (3,
        '早退')], default=0, verbose_name='签到情况')), ('score', models.
        SmallIntegerField(choices=[(100, 'A+'), (90, 'A'), (85, 'B+'), (80,
        'B'), (75, 'B-'), (70, 'C+'), (60, 'C'), (40, 'C-'), (-50, 'D'), (
        100, 'COPY'), (0, 'N/A')], default=0, verbose_name='本节成绩')), (
        'date', models.DateField(auto_now_add=True, verbose_name='日期')), (
        'note', models.TextField(blank=True, null=True, verbose_name='备注')),
        ('course_record', models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.CourseRecord', verbose_name='课程记录')), (
        'student', models.ForeignKey(blank=True, null=True, on_delete=None,
        to='crm.Customer', verbose_name='学员'))], options={
        'verbose_name_plural': '学习记录表'}), migrations.CreateModel(name=
        'SubMenu', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('name',
        models.CharField(max_length=64, verbose_name='二层菜单名')), ('url_type',
        models.SmallIntegerField(choices=[(0, 'related_name'), (1,
        'absolute_url')], default=0)), ('url_name', models.CharField(
        max_length=64, unique=True)), ('order', models.SmallIntegerField(
        default=0, verbose_name='菜单排序'))], options={'verbose_name_plural':
        '第二层菜单'}), migrations.CreateModel(name='Tag', fields=[('id', models
        .AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('name', models.CharField(max_length=32,
        unique=True, verbose_name='头衔'))], options={'verbose_name_plural':
        '职业状态'}), migrations.AddField(model_name='firstlayermenu', name=
        'sub_menus', field=models.ManyToManyField(blank=True, to=
        'crm.SubMenu')), migrations.AddField(model_name='customer', name=
        'tag', field=models.ManyToManyField(blank=True, default=None, null=
        True, to='crm.Tag', verbose_name='职业状态')), migrations.AddField(
        model_name='classlist', name='contract', field=models.ForeignKey(
        blank=True, null=True, on_delete=None, to='crm.ContractTemplate',
        verbose_name='合同')), migrations.AddField(model_name='classlist',
        name='course', field=models.ForeignKey(blank=True, null=True,
        on_delete=None, to='crm.Course', verbose_name='课程')), migrations.
        AddField(model_name='classlist', name='teachers', field=models.
        ManyToManyField(blank=True, null=True, to=settings.AUTH_USER_MODEL,
        verbose_name='上课讲师')), migrations.AddField(model_name='userprofile',
        name='branch', field=models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.CASCADE, to='crm.Branch',
        verbose_name='所属校区')), migrations.AddField(model_name='userprofile',
        name='groups', field=models.ManyToManyField(blank=True, help_text=
        'The groups this user belongs to. A user will get all permissions granted to each of their groups.'
        , related_name='user_set', related_query_name='user', to=
        'auth.Group', verbose_name='groups')), migrations.AddField(
        model_name='userprofile', name='roles', field=models.
        ManyToManyField(blank=True, to='crm.Role', verbose_name='角色')),
        migrations.AddField(model_name='userprofile', name=
        'user_permissions', field=models.ManyToManyField(blank=True,
        help_text='Specific permissions for this user.', related_name=
        'user_set', related_query_name='user', to='auth.Permission',
        verbose_name='user permissions')), migrations.AlterUniqueTogether(
        name='studyrecord', unique_together={('student', 'course_record')}),
        migrations.AlterUniqueTogether(name='enrollment', unique_together={
        ('customer', 'enrolled_class')}), migrations.AlterUniqueTogether(
        name='courserecord', unique_together={('from_class', 'day_num')}),
        migrations.AlterUniqueTogether(name='classlist', unique_together={(
        'course', 'semester')})]

# Generated by Django 2.1.3 on 2018-12-06 22:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('name', models.CharField(max_length=32, verbose_name='用户名')),
                ('email', models.EmailField(max_length=255, unique=True, verbose_name='email address')),
                ('password', models.CharField(help_text="<a class='btn-link' href='password/'>点击修改or重置密码</a>", max_length=128, verbose_name='password')),
                ('is_active', models.BooleanField(default=True, verbose_name='活动用户')),
                ('is_admin', models.BooleanField(default=False, verbose_name='超级用户')),
                ('is_staff', models.BooleanField(default=True, help_text='Designates whether the user can log into this king_admin site.', verbose_name='staff status')),
                ('memo', models.TextField(blank=True, default=None, null=True, verbose_name='备注')),
                ('date_joined', models.DateTimeField(auto_now_add=True, null=True)),
            ],
            options={
                'verbose_name_plural': 'CRM账户',
                'permissions': (('can_get_index(king_admin)', '可以访问 king_admin 首页02'), ('can_get_table_objs(king_admin)', '可以访问 king_admin 各个表02'), ('can_post_table_objs(king_admin)', '可以修改 king_admin 每个表中对象02'), ('can_get_edit_detail(king_admin)', '可以查看 king_admin 对应表详细信息02'), ('can_post_edit_detail(king_admin)', '可以修改 king_admin 对应表详细信息02'), ('can_get_change_pwd(king_admin)', '可以查看 king_admin 修改密码页面02'), ('can_post_change_pwd(king_admin)', '可以修改 king_admin 密码02'), ('can_get_obj_field_delete(king_admin)', '可以查看 king_admin 删除页面02'), ('can_post_obj_field_delete(king_admin)', '可以修改 king_admin 删除页面数据02'), ('can_get_obj_table_obj_add(king_admin)', '可以查看 king_admin 新增页面02'), ('can_post_obj_table_obj_add(king_admin)', '可以修改 king_admin 新增页面数据02'), ('can_get_index(crm)', '可以 访问 主页(crm)'), ('can_get_customer(crm)', '可以 访问 全部客户信息 页(crm)'), ('can_get_my_customers(crm)', '可以 访问 我的客户信息 页(crm)'), ('can_get_customer_add(crm)', '可以 访问 添加自己的客户信息 页(crm)'), ('can_post_customer_add(crm)', '可以 编辑 添加自己的客户信息 页(crm)'), ('can_get_my_customers_change(crm)', '可以 访问 修改自己的客户信息 页(crm)'), ('can_post_my_customers_change(crm)', '可以 编辑 修改自己的客户信息 页(crm)'), ('can_get_customer_show(crm)', '可以 访问 客户信息展示 页(crm)'), ('can_get_index(students)', '可以 访问 学生主页(students)'), ('can_get_stu_registered(students)', '可以 访问 账号注册 页(students)'), ('can_post_stu_registered(students)', '可以 编辑 账号注册 页(students)'), ('can_get_jump(students)', '可以 访问 账号注册成功跳转 页(students)'), ('can_get_classlist(students)', '可以 访问 全部班级信息 页(students)'), ('can_get_my_course(students)', '可以 访问 我的课程 页(students)'), ('can_get_payment(students)', '可以 访问 报名步骤2付款审核 页(students)'), ('can_post_payment(students)', '可以 编辑 报名步骤2付款审核 页(students)'), ('can_get_pay(students)', '可以 进入 报名步骤3付款确认 页(students)'), ('can_post_pay(students)', '可以 编辑 报名步骤3付款确认 页(students)'), ('can_get_enrollment(students)', '可以 进入 报名步骤1 页(students)'), ('can_post_enrollment(students)', '可以 编辑 报名步骤1 页(students)'), ('can_get_studyrecord(students)', '可以 访问 学习记录 页(students)'), ('can_get_index(teachers)', '可以 访问 讲师主页(teachers)'), ('can_get_my_class(teachers)', '可以 访问 我的课程 页(teachers)'), ('can_get_class_stu_list(teachers)', '可以 访问 学生学习记录 页(teachers)')),
            },
        ),
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True, verbose_name='校区')),
                ('addr', models.CharField(max_length=128, verbose_name='地址')),
            ],
            options={
                'verbose_name_plural': '校区表',
            },
        ),
        migrations.CreateModel(
            name='ClassList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('class_type', models.SmallIntegerField(choices=[(0, '面授(脱产)'), (1, '面授(周末)'), (2, '网络班')], verbose_name='班级类型')),
                ('total_class_nums', models.PositiveIntegerField(default=10, verbose_name='课程总节次')),
                ('semester', models.PositiveSmallIntegerField(verbose_name='学期')),
                ('price', models.IntegerField(default=5000, verbose_name='学费')),
                ('start_date', models.DateField(verbose_name='开班日期')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='结业日期')),
                ('branch', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Branch', verbose_name='校区')),
            ],
            options={
                'verbose_name_plural': '班级表',
            },
        ),
        migrations.CreateModel(
            name='ContractTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, verbose_name='合同名称')),
                ('template', models.TextField()),
            ],
            options={
                'verbose_name_plural': '合同表',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True, verbose_name='课程名')),
                ('description', models.TextField(verbose_name='课程描述')),
                ('period', models.PositiveSmallIntegerField(verbose_name='周期(月)')),
                ('outline', models.TextField(verbose_name='课程描述')),
            ],
            options={
                'verbose_name_plural': '课程表',
            },
        ),
        migrations.CreateModel(
            name='CourseRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day_num', models.PositiveSmallIntegerField(help_text='此处填写第几节课或第几天课程...,必须为数字', verbose_name='第几节(天)')),
                ('has_homework', models.CharField(blank=True, max_length=128, null=True, verbose_name='作业')),
                ('homework_content', models.TextField(verbose_name='本节课程作业')),
                ('date', models.DateField(auto_now_add=True, verbose_name='上课日期')),
                ('from_class', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.ClassList', verbose_name='班级(课程)')),
                ('teacher', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='老师')),
            ],
            options={
                'verbose_name_plural': '上课记录',
            },
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=32, null=True, verbose_name='姓名')),
                ('qq', models.CharField(blank=True, max_length=64, null=True, unique=True)),
                ('qq_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='QQ昵称')),
                ('phone', models.CharField(blank=True, max_length=64, null=True, verbose_name='联系电话')),
                ('source', models.SmallIntegerField(choices=[(0, '转介绍'), (1, 'QQ群'), (2, '官网'), (3, '百度推广'), (4, '51CTO'), (5, '知乎'), (6, '市场推广')], default=0, verbose_name='客户来源')),
                ('content', models.TextField(verbose_name='咨询详情')),
                ('id_num', models.CharField(blank=True, max_length=64, null=True, verbose_name='身份证')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, unique=True, verbose_name='常用邮箱')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='日期')),
                ('status', models.SmallIntegerField(choices=[(0, '未报名'), (1, '已报名')], default=0, verbose_name='报名情况')),
                ('consult_course', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Course', verbose_name='咨询课程')),
                ('consultant', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='跟进人')),
                ('referral_from', models.ForeignKey(blank=True, help_text='若介绍人是内部学员,请在此处选择内部学员姓名', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='internal_referral', to='crm.Customer', verbose_name='转介绍人')),
            ],
            options={
                'verbose_name_plural': '客户信息表',
            },
        ),
        migrations.CreateModel(
            name='CustomerFollowUp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(verbose_name='跟进内容')),
                ('intention', models.SmallIntegerField(choices=[(0, '2周内报名'), (1, '1个月内报名'), (2, '近期无报名计划'), (3, '已在其他机构报名'), (4, '未报名'), (5, '已报名'), (6, '已拉黑')], verbose_name='跟踪情况')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('consultant', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='跟进人')),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='咨询客户跟踪')),
            ],
            options={
                'verbose_name_plural': '客户跟进记录',
            },
        ),
        migrations.CreateModel(
            name='Enrollment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enrolled_date', models.DateTimeField(auto_created=True, auto_now_add=True, verbose_name='报名日期')),
                ('your_expectation', models.TextField(blank=True, max_length=1024, null=True, verbose_name='学完想达到的具体期望')),
                ('contract_agreed', models.BooleanField(default=False, help_text='我已认真阅读完培训协议并同意全部协议内容', verbose_name='是否同意协议')),
                ('contract_approved', models.BooleanField(default=False, help_text='在审阅完学员的资料无误后勾选此项,合同即生效', verbose_name='审核通过')),
                ('memo', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('consultant', models.ForeignKey(blank=True, null=True, on_delete=None, to=settings.AUTH_USER_MODEL, verbose_name='课程顾问')),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='客户')),
                ('enrolled_class', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.ClassList', verbose_name='所报班级')),
                ('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Branch', verbose_name='校区')),
            ],
            options={
                'verbose_name_plural': '报名表',
            },
        ),
        migrations.CreateModel(
            name='FirstLayerMenu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='菜单名')),
                ('url_type', models.SmallIntegerField(choices=[(0, 'related_name'), (1, 'absolute_url')], default=0)),
                ('url_name', models.CharField(max_length=64, unique=True)),
                ('order', models.SmallIntegerField(default=0, verbose_name='菜单排序')),
            ],
            options={
                'verbose_name_plural': '第一层菜单',
            },
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pay_type', models.CharField(blank=True, choices=[('deposit', '订金/报名费'), ('tution', '学费'), ('refund', '退款')], default='tution', max_length=64, null=True, verbose_name='费用类型')),
                ('amount', models.PositiveSmallIntegerField(default=0, verbose_name='金额')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='交款日期')),
                ('note', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Course', verbose_name='所报课程')),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='客户')),
                ('enrollment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Enrollment')),
            ],
            options={
                'verbose_name_plural': '缴费记录',
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True, verbose_name='角色')),
                ('menus', models.ManyToManyField(blank=True, to='crm.FirstLayerMenu')),
            ],
            options={
                'verbose_name_plural': '角色',
            },
        ),
        migrations.CreateModel(
            name='StuAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128)),
                ('valid_start', models.DateTimeField(blank=True, null=True, verbose_name='账户有效期开始')),
                ('valid_end', models.DateTimeField(blank=True, null=True, verbose_name='账户有效期截止')),
                ('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='crm.Customer')),
            ],
        ),
        migrations.CreateModel(
            name='StudyRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attendance', models.SmallIntegerField(choices=[(0, '已签到'), (1, '迟到'), (2, '缺勤'), (3, '早退')], default=0, verbose_name='签到情况')),
                ('score', models.SmallIntegerField(choices=[(100, 'A+'), (90, 'A'), (85, 'B+'), (80, 'B'), (75, 'B-'), (70, 'C+'), (60, 'C'), (40, 'C-'), (-50, 'D'), (100, 'COPY'), (0, 'N/A')], default=0, verbose_name='本节成绩')),
                ('date', models.DateField(auto_now_add=True, verbose_name='日期')),
                ('note', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('course_record', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.CourseRecord', verbose_name='课程记录')),
                ('student', models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Customer', verbose_name='学员')),
            ],
            options={
                'verbose_name_plural': '学习记录表',
            },
        ),
        migrations.CreateModel(
            name='SubMenu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='二层菜单名')),
                ('url_type', models.SmallIntegerField(choices=[(0, 'related_name'), (1, 'absolute_url')], default=0)),
                ('url_name', models.CharField(max_length=64, unique=True)),
                ('order', models.SmallIntegerField(default=0, verbose_name='菜单排序')),
            ],
            options={
                'verbose_name_plural': '第二层菜单',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True, verbose_name='头衔')),
            ],
            options={
                'verbose_name_plural': '职业状态',
            },
        ),
        migrations.AddField(
            model_name='firstlayermenu',
            name='sub_menus',
            field=models.ManyToManyField(blank=True, to='crm.SubMenu'),
        ),
        migrations.AddField(
            model_name='customer',
            name='tag',
            field=models.ManyToManyField(blank=True, default=None, null=True, to='crm.Tag', verbose_name='职业状态'),
        ),
        migrations.AddField(
            model_name='classlist',
            name='contract',
            field=models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.ContractTemplate', verbose_name='合同'),
        ),
        migrations.AddField(
            model_name='classlist',
            name='course',
            field=models.ForeignKey(blank=True, null=True, on_delete=None, to='crm.Course', verbose_name='课程'),
        ),
        migrations.AddField(
            model_name='classlist',
            name='teachers',
            field=models.ManyToManyField(blank=True, null=True, to=settings.AUTH_USER_MODEL, verbose_name='上课讲师'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='branch',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.Branch', verbose_name='所属校区'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='groups',
            field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='roles',
            field=models.ManyToManyField(blank=True, to='crm.Role', verbose_name='角色'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
        migrations.AlterUniqueTogether(
            name='studyrecord',
            unique_together={('student', 'course_record')},
        ),
        migrations.AlterUniqueTogether(
            name='enrollment',
            unique_together={('customer', 'enrolled_class')},
        ),
        migrations.AlterUniqueTogether(
            name='courserecord',
            unique_together={('from_class', 'day_num')},
        ),
        migrations.AlterUniqueTogether(
            name='classlist',
            unique_together={('course', 'semester')},
        ),
    ]
