# Generated by Django 2.1.7 on 2019-10-24 16:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('product', '0001_initial'),
        ('auth', '0009_alter_user_last_name_max_length'),
        ('company', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='authorizedproducts',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='a_product', to='product.Product', verbose_name='产品'),
        ),
        migrations.AddField(
            model_name='authorizedproducts',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='a_user', to=settings.AUTH_USER_MODEL, verbose_name='授权操作人'),
        ),
        migrations.AddField(
            model_name='user',
            name='company',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_company', to='company.Company', verbose_name='公司名称'),
        ),
        migrations.AddField(
            model_name='user',
            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='user',
            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'),
        ),
        migrations.AlterUniqueTogether(
            name='subsaldivision',
            unique_together={('division', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='salesdivision',
            unique_together={('company', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='prdworkshop',
            unique_together={('company', 'prd_plant', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='prdteam',
            unique_together={('company', 'prd_plant', 'prd_workshop', 'prd_line', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='prdqc',
            unique_together={('company', 'prd_plant', 'prd_workshop', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='prdplant',
            unique_together={('company', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='prdline',
            unique_together={('prd_workshop', 'prd_plant', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='company',
            unique_together={('hierarchy', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='categoryprop',
            unique_together={('category', 'name')},
        ),
    ]
