# Generated by Django 4.2.7 on 2025-12-14 05:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="EthereumWallet",
            fields=[
                (
                    "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),
                ),
                (
                    "id",
                    models.CharField(max_length=50, primary_key=True, serialize=False),
                ),
                ("ens_name", models.CharField(blank=True, max_length=50, null=True)),
                ("assets", models.JSONField(blank=True, null=True)),
                (
                    "ethereum_balance",
                    models.DecimalField(decimal_places=18, default=0, max_digits=30),
                ),
                (
                    "usdc_balance",
                    models.DecimalField(decimal_places=6, default=0, max_digits=30),
                ),
                (
                    "stablecoin_total_balance",
                    models.DecimalField(decimal_places=18, default=0, max_digits=30),
                ),
                (
                    "assets_total_value_usd",
                    models.DecimalField(decimal_places=18, default=0, max_digits=30),
                ),
            ],
            options={
                "db_table": "ethereum__wallets",
            },
        ),
        migrations.CreateModel(
            name="EthereumTransaction",
            fields=[
                (
                    "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),
                ),
                (
                    "id",
                    models.CharField(max_length=75, primary_key=True, serialize=False),
                ),
                ("hash", models.CharField(blank=True, max_length=50, null=True)),
                ("created_at_original", models.DateTimeField(blank=True, null=True)),
                ("chain", models.CharField(blank=True, max_length=25, null=True)),
                ("asset", models.CharField(blank=True, max_length=10, null=True)),
                (
                    "amount",
                    models.DecimalField(decimal_places=18, default=0, max_digits=30),
                ),
                ("value_usd_original", models.FloatField(blank=True, null=True)),
                ("value_usd", models.FloatField(blank=True, null=True)),
                (
                    "from_address",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="transactions_recieved",
                        to="ethereum.ethereumwallet",
                    ),
                ),
                (
                    "to_address",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="transactions_sent",
                        to="ethereum.ethereumwallet",
                    ),
                ),
            ],
            options={
                "db_table": "ethereum__transactions",
            },
        ),
    ]
