# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-10-12 20:56
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('crm', '0049_auto_20181014_2258'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='customergrouptransform',
            name='product',
        ),
        migrations.RemoveField(
            model_name='position',
            name='product',
        ),
        migrations.RemoveField(
            model_name='unittransform',
            name='product',
        ),
        migrations.RemoveField(
            model_name='Price',
            name='product',
        ),
        migrations.RenameModel(old_name='Product',
                               new_name='ProductType'),

        migrations.CreateModel(
            name='ProductPrice',
            fields=[
                ('price_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='crm.Price')),
                ('product_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='crm.ProductType', verbose_name='Product'),)
            ],
            options={
                'verbose_name': 'Product Price',
                'verbose_name_plural': 'Product Prices',
            },
            bases=('crm.price',),
        ),
        migrations.AddField(
            model_name='customergrouptransform',
            name='product_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='crm.ProductType', verbose_name='Product Type'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='position',
            name='product_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='crm.ProductType', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='unittransform',
            name='product_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='crm.ProductType', verbose_name='Product Type'),
            preserve_default=False,
        ),
    ]
