# Generated by Django 3.1.4 on 2022-05-06 16:06

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0284_userloginhistory'),
    ]

    operations = [
        migrations.CreateModel(
            name='Configure',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('module', models.CharField(max_length=50, verbose_name='所属模块')),
                ('module_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='模块名称')),
                ('code', models.CharField(max_length=20, unique=True, verbose_name='代码')),
                ('name', models.CharField(max_length=50, verbose_name='名称')),
            ],
            options={
                'verbose_name': '企业配置项',
                'verbose_name_plural': '企业配置项',
            },
        ),
        migrations.CreateModel(
            name='ConfigureOption',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('option', models.CharField(max_length=50, verbose_name='选项')),
                ('configure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='configureoption_configure', to='company.configure', verbose_name='企业配置项')),
            ],
            options={
                'verbose_name': '配置选项',
                'verbose_name_plural': '配置选项',
            },
        ),
        migrations.CreateModel(
            name='CompanyCfgOpt',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='companycfgopt_company', to='company.company', verbose_name='企业')),
                ('configure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='companycfgopt_configure', to='company.configure', verbose_name='配置项')),
                ('option', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='companycfgopt_option', to='company.configureoption', verbose_name='选项')),
            ],
            options={
                'verbose_name': '企业配置',
                'verbose_name_plural': '企业配置',
                'unique_together': {('company', 'configure')},
            },
        ),
    ]
