# Generated by Django 2.2.1 on 2019-09-11 09:58

from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('groups', 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')),
                ('user_permissions', 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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
                'swappable': 'AUTH_USER_MODEL',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='SmAdminAction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action_id', models.IntegerField()),
                ('parent_id', models.IntegerField()),
                ('action_names', models.CharField(blank=True, max_length=512, null=True, verbose_name='权限标识的名字')),
                ('action_code', models.CharField(blank=True, max_length=512, null=True, verbose_name='权限标识码')),
                ('is_show', models.BooleanField(default=False, verbose_name='是否显示')),
                ('is_status', models.BooleanField(default=True, verbose_name='是否启用')),
                ('action_order', models.IntegerField(blank=True, default=99, null=True, verbose_name='排序')),
                ('action_note', models.CharField(blank=True, max_length=1024, null=True, verbose_name='权限标识说明')),
            ],
            options={
                'verbose_name': '权限标识',
                'verbose_name_plural': '权限标识',
                'ordering': ['-action_names'],
            },
        ),
        migrations.CreateModel(
            name='SmGroupType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='部门名称')),
                ('top_id', models.IntegerField(blank=True, default=0, null=True, verbose_name='顶级ID')),
                ('p_id', models.IntegerField(blank=True, default=0, null=True, verbose_name='父级ID')),
                ('g_level', models.IntegerField(blank=True, default=0, null=True, verbose_name='部门所在的层级')),
                ('g_list', models.IntegerField(blank=True, default=0, null=True, verbose_name='')),
                ('is_manage', models.IntegerField(blank=True, default=0, null=True, verbose_name='')),
                ('group_orderby', models.IntegerField(blank=True, default=0, null=True, verbose_name='排序')),
                ('is_status', models.BooleanField(blank=True, default=True, null=True, verbose_name='是否启用')),
                ('is_show', models.BooleanField(blank=True, default=True, null=True, verbose_name='是否显示')),
                ('group_list', models.CharField(blank=True, max_length=64, null=True, verbose_name='部门所拥有的网站权限')),
                ('group_list2', models.CharField(blank=True, max_length=1024, null=True, verbose_name='部门所管辖的子部门，每个部门ID用[ ]进行分割')),
                ('action_list', models.CharField(blank=True, max_length=64, null=True, verbose_name='部门所拥有的权限标识字符串')),
                ('customer_site_list', models.CharField(blank=True, max_length=64, null=True, verbose_name='客户来源，主要用于二线的网站控制')),
                ('max_order_zck', models.IntegerField(blank=True, default=5, null=True, verbose_name='部门最大暂存订单数')),
                ('inter_userName', models.CharField(blank=True, max_length=64, null=True, verbose_name='短信接口的名字，暂时用不上')),
                ('sms_id', models.IntegerField(blank=True, null=True, verbose_name='短信接口的ID')),
                ('mail_user', models.CharField(blank=True, max_length=64, null=True, verbose_name='邮箱的名字，用于邮箱的同步')),
                ('mail_psw', models.CharField(blank=True, max_length=64, null=True, verbose_name='邮箱的密码，用于邮箱的同步程序')),
                ('company_id', models.CharField(blank=True, max_length=64, null=True, verbose_name='部门管理的公司ID，只用到添加用户的时候，获取部门的这个值，具体管理公司的权限是在用户表')),
                ('work_company_id', models.IntegerField(blank=True, null=True, verbose_name='部门所在的公司')),
                ('zhekou', models.FloatField(blank=True, default=0, null=True, verbose_name='最低折扣')),
                ('max_customer', models.IntegerField(blank=True, default=0, null=True, verbose_name='部门所能拥有的最大的客户数，用于二线的客户数量控制')),
                ('is_leaf', models.IntegerField(blank=True, default=0, null=True, verbose_name='暂时没有')),
            ],
        ),
        migrations.CreateModel(
            name='SmRole',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('parent_id', models.IntegerField(blank=True, null=True, verbose_name='父级ID')),
                ('role_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='角色名字')),
                ('action_list', models.CharField(blank=True, max_length=64, null=True, verbose_name='权限标识组成的字符串')),
                ('web_list', models.CharField(blank=True, max_length=64, null=True, verbose_name='')),
                ('role_describe', models.CharField(blank=True, max_length=256, null=True, verbose_name='角色描述')),
                ('role_orderby', models.IntegerField(blank=True, default=0, null=True, verbose_name='排序')),
                ('action_code', models.CharField(blank=True, max_length=64, null=True, verbose_name='角色标识码，ID是会变的，标识码更灵活一点')),
            ],
        ),
        migrations.CreateModel(
            name='PersonalProfile',
            fields=[
                ('userprofile_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('Clear_Password', models.CharField(default='123456', max_length=16)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('user.userprofile',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='RootProfile',
            fields=[
                ('userprofile_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('user.userprofile',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='SmAdminUser',
            fields=[
                ('userprofile_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('user_true_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='姓名')),
                ('fenji', models.CharField(blank=True, max_length=64, null=True, verbose_name='分机号')),
                ('bianhao', models.CharField(blank=True, max_length=64, verbose_name='编号')),
                ('role_id', models.IntegerField(blank=True, default=0, verbose_name='角色 与ck_role表的 role_id 关联')),
                ('group_id', models.IntegerField(blank=True, default=0, verbose_name='部门  获取部门名称')),
                ('is_manage', models.BooleanField(blank=True, default=False, null=True, verbose_name='是否部门主管 0不是  1 是')),
                ('purview_type', models.BooleanField(blank=True, default=False, null=True, verbose_name='是定义权限')),
                ('user_plus', models.BooleanField(blank=True, default=False, null=True, verbose_name='附加权限')),
                ('enty_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='入职时间')),
                ('user_status', models.SmallIntegerField(choices=[(0, '禁用'), (1, '正常'), (2, '离职')], default=1, verbose_name='用户状况 0禁用  1正常 2 离职')),
                ('is_hs', models.IntegerField()),
                ('one_two', models.IntegerField()),
                ('is_update', models.IntegerField(blank=True, default=1, null=True, verbose_name='更新用户信息用')),
                ('logintype', models.CharField(blank=True, max_length=64, null=True, verbose_name='')),
                ('pid', models.IntegerField()),
                ('depth', models.CharField(blank=True, max_length=64, null=True, verbose_name='')),
                ('sproupid', models.IntegerField()),
                ('user_level', models.IntegerField()),
                ('website_id', models.CharField(blank=True, max_length=64, null=True, verbose_name='为空取部门  不为空取website_id')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('user.userprofile',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
