# Generated by Django 3.2.10 on 2022-01-20 14:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('resource_tracker', '0008_auto_20220120_1538'),
        ('profiles', '0003_role_team_teamrolebinding_userrolebinding'),
    ]

    operations = [
        migrations.CreateModel(
            name='Quota',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('attribute_definitions', models.ManyToManyField(blank=True, help_text='The attribute definitions linked to this quota.', related_name='quota', related_query_name='quota', to='resource_tracker.ResourceGroupAttributeDefinition', verbose_name='Attribute Definition')),
            ],
        ),
        migrations.CreateModel(
            name='QuotaBinding',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('limit', models.FloatField(default=0)),
                ('consumed', models.FloatField(default=0)),
                ('billing_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='quota_bindings', to='profiles.billinggroup')),
                ('quota', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='quota_bindings', to='profiles.quota')),
            ],
            options={
                'unique_together': {('billing_group', 'quota')},
            },
        ),
    ]
