# Generated by Django 2.1.8 on 2019-12-01 12:52

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', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='AuthGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, unique=True)),
            ],
            options={
                'db_table': 'auth_group',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='AuthGroupPermissions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'db_table': 'auth_group_permissions',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='AuthPermission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('codename', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'auth_permission',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='DjangoAdminLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action_time', models.DateTimeField()),
                ('object_id', models.TextField(blank=True, null=True)),
                ('object_repr', models.CharField(max_length=200)),
                ('action_flag', models.PositiveSmallIntegerField()),
                ('change_message', models.TextField()),
            ],
            options={
                'db_table': 'django_admin_log',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='DjangoContentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('app_label', models.CharField(max_length=100)),
                ('model', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'django_content_type',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='DjangoMigrations',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('app', models.CharField(max_length=255)),
                ('name', models.CharField(max_length=255)),
                ('applied', models.DateTimeField()),
            ],
            options={
                'db_table': 'django_migrations',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='DjangoSession',
            fields=[
                ('session_key', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('session_data', models.TextField()),
                ('expire_date', models.DateTimeField()),
            ],
            options={
                'db_table': 'django_session',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='UserAdmin',
            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')),
                ('name', models.CharField(blank=True, max_length=20, null=True)),
                ('pwd', models.CharField(blank=True, max_length=32, null=True)),
                ('role_priv_level', models.CharField(blank=True, max_length=11, null=True)),
                ('if_online', models.IntegerField(blank=True, null=True)),
                ('is_locked', models.IntegerField(blank=True, null=True)),
                ('user_espired', models.DateTimeField(blank=True, null=True)),
                ('user_modile', models.CharField(blank=True, max_length=11, null=True)),
            ],
            options={
                'db_table': 'user_admin',
                'managed': True,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='CptInfo',
            fields=[
                ('cpt_id', models.IntegerField(primary_key=True, serialize=False)),
                ('ide_id', models.IntegerField(blank=True, null=True)),
                ('cp_name', models.CharField(blank=True, max_length=20, null=True)),
            ],
            options={
                'db_table': 'cpt_info',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Crup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('operate_id', models.IntegerField(blank=True, null=True)),
                ('operate_name', models.CharField(blank=True, max_length=10, null=True)),
            ],
            options={
                'db_table': 'crup',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='DpttInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bumen_biao', models.IntegerField()),
                ('dptt', models.IntegerField()),
                ('dptt_name', models.CharField(blank=True, max_length=50, null=True)),
                ('cp_biao', models.ForeignKey(blank=True, db_column='cp_biao', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.CptInfo')),
            ],
            options={
                'db_table': 'dptt_info',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='ModuleDefine',
            fields=[
                ('modle_id', models.AutoField(primary_key=True, serialize=False)),
                ('modle_name', models.CharField(blank=True, max_length=64, null=True)),
                ('modle_parent', models.IntegerField(blank=True, null=True)),
                ('modle_hierarchy', models.CharField(blank=True, max_length=255, null=True)),
                ('modle_level', models.SmallIntegerField(blank=True, null=True)),
                ('icon_name', models.CharField(blank=True, max_length=255, null=True)),
                ('module_url', models.CharField(blank=True, max_length=255, null=True)),
                ('models_key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app1.ModuleDefine')),
            ],
            options={
                'db_table': 'module_define',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='RoleDefine',
            fields=[
                ('role_id', models.AutoField(primary_key=True, serialize=False)),
                ('role_name', models.CharField(blank=True, max_length=20, null=True)),
                ('role_description', models.CharField(blank=True, max_length=256, null=True)),
                ('role_priv_level', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'db_table': 'role_define',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='StallInfo',
            fields=[
                ('staff_ide', models.IntegerField(blank=True, null=True)),
                ('staff_id', models.AutoField(primary_key=True, serialize=False)),
                ('staff_name', models.CharField(max_length=6)),
                ('com_ide', models.ForeignKey(blank=True, db_column='com_ide', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.CptInfo')),
                ('department', models.ForeignKey(blank=True, db_column='department', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.DpttInfo')),
            ],
            options={
                'db_table': 'stall_info',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='PormissionDefine',
            fields=[
                ('role', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='app1.RoleDefine')),
                ('crud_opreation', models.CharField(blank=True, max_length=40, null=True)),
                ('module', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.ModuleDefine')),
            ],
            options={
                'db_table': 'pormission_define',
                'managed': True,
            },
        ),
        migrations.AddField(
            model_name='useradmin',
            name='company',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.CptInfo'),
        ),
        migrations.AddField(
            model_name='useradmin',
            name='dept',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.DpttInfo'),
        ),
        migrations.AddField(
            model_name='useradmin',
            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='useradmin',
            name='role',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.RoleDefine'),
        ),
        migrations.AddField(
            model_name='useradmin',
            name='staff',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app1.StallInfo'),
        ),
        migrations.AddField(
            model_name='useradmin',
            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'),
        ),
    ]
