# Generated by Django 6.1.1 on 2026-10-17 09:40

import django.core.validators
import uuid
from decimal import Decimal
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Balance',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('asset', models.CharField(max_length=20)),
                ('account_type', models.CharField(default='spot', max_length=50)),
                ('total', models.DecimalField(decimal_places=8, default=Decimal('0E-8'), max_digits=30)),
                ('available', models.DecimalField(decimal_places=8, default=Decimal('0E-8'), max_digits=30)),
                ('locked', models.DecimalField(decimal_places=8, default=Decimal('0E-8'), max_digits=30)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'balances',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='WithdrawalRequest',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('withdrawal_uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
                ('asset', models.CharField(max_length=20)),
                ('amount', models.DecimalField(decimal_places=8, max_digits=30, validators=[django.core.validators.MinValueValidator(Decimal('1E-8'))])),
                ('address', models.TextField()),
                ('network', models.CharField(max_length=50)),
                ('status', models.CharField(default='pending', max_length=20)),
                ('provider_txid', models.TextField(blank=True, null=True)),
                ('idempotency_key', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'withdrawal_requests',
                'managed': False,
            },
        ),
    ]
