# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-09-13 16:19
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('marketplace', '0033_plancomponent_billing_type'),
    ]

    operations = [
        migrations.CreateModel(
            name='ComponentQuota',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('limit', models.PositiveIntegerField(default=-1)),
                ('usage', models.PositiveIntegerField(default=0)),
                ('component', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='marketplace.PlanComponent')),
            ],
        ),
        migrations.AlterModelOptions(
            name='order',
            options={'ordering': ('created',), 'verbose_name': 'Order'},
        ),
        migrations.AlterModelOptions(
            name='orderitem',
            options={'ordering': ('created',), 'verbose_name': 'Order item'},
        ),
        migrations.AddField(
            model_name='componentquota',
            name='order_item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='quotas', to='marketplace.OrderItem'),
        ),
        migrations.AlterUniqueTogether(
            name='componentquota',
            unique_together=set([('order_item', 'component')]),
        ),
    ]
