# Generated by Django 3.1.4 on 2022-05-06 17:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0286_companycfgopt_values'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='companycfgopt',
            options={'verbose_name': '企业设置', 'verbose_name_plural': '企业设置'},
        ),
        migrations.RemoveField(
            model_name='companycfgopt',
            name='values',
        ),
        migrations.CreateModel(
            name='UserCfgOpt',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('values', models.JSONField(blank=True, default=list, null=True, verbose_name='选项')),
                ('configure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='usercfgopt_configure', to='company.configure', verbose_name='配置项')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='usercfgopt_user', to=settings.AUTH_USER_MODEL, verbose_name='用户帐号')),
            ],
            options={
                'verbose_name': '用户设置',
                'verbose_name_plural': '用户设置',
                'unique_together': {('user', 'configure')},
            },
        ),
        migrations.CreateModel(
            name='CGroupCfgOpt',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('values', models.JSONField(blank=True, default=list, null=True, verbose_name='选项值集合')),
                ('cgroup', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cgroupcfgopt_cgroup', to='company.cgroup', verbose_name='企业功能组')),
                ('configure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cgroupcfgopt_configure', to='company.configure', verbose_name='配置项')),
            ],
            options={
                'verbose_name': '企业功能组设置',
                'verbose_name_plural': '企业功能组设置',
                'unique_together': {('cgroup', 'configure')},
            },
        ),
    ]
