# Generated by Django 3.1.4 on 2021-07-15 13:59

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0220_companycfg_inbound_ticket'),
    ]

    operations = [
        migrations.AddField(
            model_name='company',
            name='franchise_status',
            field=models.JSONField(blank=True, default=list, null=True, verbose_name='加盟店状态'),
        ),
        migrations.CreateModel(
            name='FranchiseStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.SmallIntegerField(choices=[(0, '未加盟'), (1, '已加盟')], verbose_name='状态类别')),
                ('name', models.CharField(max_length=50, verbose_name='状态名称')),
                ('icon', models.CharField(blank=True, max_length=50, null=True, verbose_name='图标')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='franchisestatus_company', to='company.company', verbose_name='所属企业')),
            ],
            options={
                'verbose_name': '加盟店状态',
                'verbose_name_plural': '加盟店状态',
            },
        ),
        migrations.CreateModel(
            name='CompanyDiv',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('div_name', models.CharField(max_length=50, verbose_name='一级区域')),
                ('subdiv_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='二级区域')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='companydiv_company', to='company.company', verbose_name='所属企业')),
            ],
            options={
                'verbose_name': '营销区域/客户分类名称',
                'verbose_name_plural': '营销区域/客户分类名称',
            },
        ),
        migrations.CreateModel(
            name='CompanyChangLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('operation', models.CharField(max_length=20, verbose_name='执行操作')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('dt', models.DateField(auto_now_add=True, verbose_name='日期')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='companychangelog_company', to='company.company', verbose_name='公司名称')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='companychangelog_user', to=settings.AUTH_USER_MODEL, verbose_name='操作人')),
            ],
            options={
                'verbose_name': '公司/客户信息修改日志',
                'verbose_name_plural': '公司/客户信息修改日志',
            },
        ),
    ]
