# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-01-22 14:51
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('marketplace', '0052_resourceplanperiod'),
    ]

    operations = [
        migrations.CreateModel(
            name='CategoryComponent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(blank=True, max_length=500, verbose_name='description')),
                ('name', models.CharField(help_text='Display name for the measured unit, for example, Floating IP.', max_length=150)),
                ('type', models.CharField(help_text='Unique internal name of the measured unit, for example floating_ip.', max_length=50)),
                ('measured_unit', models.CharField(blank=True, help_text='Unit of measurement, for example, GB.', max_length=30)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='components', to='marketplace.Category')),
            ],
        ),
        migrations.AddField(
            model_name='offeringcomponent',
            name='parent',
            field=models.ForeignKey(null=True, blank=True, on_delete=django.db.models.deletion.CASCADE, to='marketplace.CategoryComponent'),
        ),
        migrations.AlterUniqueTogether(
            name='categorycomponent',
            unique_together=set([('type', 'category')]),
        ),
    ]
