# Generated by Django 4.2.7 on 2025-12-18 21:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="PricedItem",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("category", models.TextField(blank=True, null=True)),
                ("name", models.TextField(blank=True, null=True)),
                ("preferred_source", models.TextField(blank=True, null=True)),
                ("comments", models.TextField(blank=True, null=True)),
                ("price", models.FloatField(blank=True, null=True)),
                ("price_unit", models.TextField(blank=True, null=True)),
                ("global_abundance", models.FloatField(blank=True, null=True)),
                ("global_abundance_unit", models.TextField(blank=True, null=True)),
                ("market_cap", models.FloatField(blank=True, null=True)),
                ("global_abundance_kg", models.FloatField(blank=True, null=True)),
                (
                    "global_abundance_mg_per_kg_crust",
                    models.FloatField(blank=True, null=True),
                ),
                ("price_per_kg", models.FloatField(blank=True, null=True)),
                ("price_1y_stats", models.JSONField(blank=True, null=True)),
                ("price_5y_stats", models.JSONField(blank=True, null=True)),
                ("price_10y_stats", models.JSONField(blank=True, null=True)),
                ("price_25y_stats", models.JSONField(blank=True, null=True)),
            ],
            options={
                "db_table": "price_catalog__priced_items",
            },
        ),
        migrations.CreateModel(
            name="PricePoint",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("ticker_source", models.TextField(blank=True, null=True)),
                ("ticker", models.TextField(blank=True, null=True)),
                ("date", models.DateTimeField(blank=True, null=True)),
                ("price", models.FloatField(blank=True, null=True)),
                ("price_inflation_adj", models.FloatField(blank=True, null=True)),
                ("comments", models.TextField(blank=True, null=True)),
                ("delta_1y", models.FloatField(blank=True, null=True)),
                ("delta_1y_inflation_adj", models.FloatField(blank=True, null=True)),
                ("delta_1y_percent", models.FloatField(blank=True, null=True)),
                (
                    "delta_1y_percent_inflation_adj",
                    models.FloatField(blank=True, null=True),
                ),
                ("delta_5y", models.FloatField(blank=True, null=True)),
                ("delta_5y_inflation_adj", models.FloatField(blank=True, null=True)),
                ("delta_5y_percent", models.FloatField(blank=True, null=True)),
                (
                    "delta_5y_percent_inflation_adj",
                    models.FloatField(blank=True, null=True),
                ),
                ("delta_10y", models.FloatField(blank=True, null=True)),
                ("delta_10y_inflation_adj", models.FloatField(blank=True, null=True)),
                ("delta_10y_percent", models.FloatField(blank=True, null=True)),
                (
                    "delta_10y_percent_inflation_adj",
                    models.FloatField(blank=True, null=True),
                ),
                ("delta_25y", models.FloatField(blank=True, null=True)),
                ("delta_25y_inflation_adj", models.FloatField(blank=True, null=True)),
                ("delta_25y_percent", models.FloatField(blank=True, null=True)),
                (
                    "delta_25y_percent_inflation_adj",
                    models.FloatField(blank=True, null=True),
                ),
                (
                    "priced_item",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="price_points",
                        to="price_catalog.priceditem",
                    ),
                ),
            ],
            options={
                "db_table": "price_catalog__price_points",
                "unique_together": {("priced_item", "ticker", "date")},
            },
        ),
    ]
