# Generated by Django 3.0.5 on 2020-06-27 06:13

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('crm', '0014_auto_20200502_1054'),
    ]

    operations = [
        migrations.CreateModel(
            name='ConsumerPerm',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('name', models.CharField(max_length=30, unique=True, verbose_name='名称')),
                ('code', models.CharField(max_length=50, unique=True, verbose_name='方法/代号')),
                ('pid', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='crm.ConsumerPerm', verbose_name='父')),
            ],
            options={
                'verbose_name': '客户权限表',
                'verbose_name_plural': '客户权限表',
            },
        ),
        migrations.AlterField(
            model_name='company',
            name='name',
            field=models.CharField(max_length=60, unique=True, verbose_name='名称'),
        ),
        migrations.CreateModel(
            name='ConsumerRole',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('name', models.CharField(max_length=30, unique=True, verbose_name='名称')),
                ('description', models.CharField(blank=True, max_length=50, null=True, verbose_name='描述')),
                ('perms', models.ManyToManyField(blank=True, to='crm.ConsumerPerm', verbose_name='功能权限')),
            ],
            options={
                'verbose_name': '客户角色表',
                'verbose_name_plural': '客户角色表',
            },
        ),
    ]
