# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-09-03 10:05
from __future__ import unicode_literals

from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('marketplace', '0030_add_required_field_to_attribute_model'),
    ]

    operations = [
        migrations.CreateModel(
            name='PlanComponent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=50)),
                ('amount', models.PositiveIntegerField(default=0)),
                ('price', models.DecimalField(decimal_places=10, default=0, max_digits=14, validators=[django.core.validators.MinValueValidator(Decimal('0'))], verbose_name='Price per unit per billing period.')),
                ('plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='components', to='marketplace.Plan')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='plancomponent',
            unique_together=set([('type', 'plan')]),
        ),
    ]
