# Generated by Django 3.1.3 on 2020-11-20 17:49
import django.db.models.deletion
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

    dependencies = [("reporting", "0151_ocp_summary_table_presto_interface")]

    operations = [
        migrations.CreateModel(
            name="GCPCostEntryLineItem",
            fields=[
                ("id", models.BigAutoField(primary_key=True, serialize=False)),
                ("usage_start", models.DateTimeField()),
                ("usage_end", models.DateTimeField()),
                ("tags", models.JSONField(null=True)),
                ("usage_type", models.CharField(max_length=50, null=True)),
                ("location", models.CharField(blank=True, max_length=256, null=True)),
                ("country", models.CharField(blank=True, max_length=256, null=True)),
                ("region", models.CharField(blank=True, max_length=256, null=True)),
                ("zone", models.CharField(blank=True, max_length=256, null=True)),
                ("export_time", models.CharField(blank=True, max_length=256, null=True)),
                ("cost", models.DecimalField(blank=True, decimal_places=9, max_digits=24, null=True)),
                ("currency", models.CharField(blank=True, max_length=256, null=True)),
                ("conversion_rate", models.CharField(blank=True, max_length=256, null=True)),
                ("usage_amount", models.DecimalField(decimal_places=9, max_digits=24, null=True)),
                ("usage_unit", models.CharField(blank=True, max_length=256, null=True)),
                ("usage_to_pricing_units", models.DecimalField(decimal_places=9, max_digits=24, null=True)),
                ("usage_pricing_unit", models.CharField(blank=True, max_length=256, null=True)),
                ("credits", models.CharField(blank=True, max_length=256, null=True)),
                ("invoice_month", models.CharField(blank=True, max_length=256, null=True)),
                ("cost_type", models.CharField(blank=True, max_length=256, null=True)),
                ("line_item_type", models.CharField(max_length=256, null=True)),
                (
                    "cost_entry_bill",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="reporting.gcpcostentrybill"),
                ),
            ],
            options={"db_table": "reporting_gcpcostentrylineitem"},
        ),
        migrations.CreateModel(
            name="GCPCostEntryProductService",
            fields=[
                ("id", models.BigAutoField(primary_key=True, serialize=False)),
                ("service_id", models.CharField(max_length=256, null=True)),
                ("service_alias", models.CharField(blank=True, max_length=256, null=True)),
                ("sku_id", models.CharField(max_length=256, null=True)),
                ("sku_alias", models.CharField(max_length=256, null=True)),
            ],
            options={
                "db_table": "reporting_gcpcostentryproductservice",
                "unique_together": {("service_id", "service_alias", "sku_id", "sku_alias")},
            },
        ),
        migrations.RemoveField(model_name="gcpproject", name="project_number"),
        migrations.DeleteModel(name="GCPCostEntryLineItemDaily"),
        migrations.AddField(
            model_name="gcpcostentrylineitem",
            name="cost_entry_product",
            field=models.ForeignKey(
                null=True, on_delete=django.db.models.deletion.CASCADE, to="reporting.gcpcostentryproductservice"
            ),
        ),
        migrations.AddField(
            model_name="gcpcostentrylineitem",
            name="project",
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="reporting.gcpproject"),
        ),
    ]
