# Generated by Django 5.2.7 on 2026-02-06 07:01

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cryptocurrency',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('symbol', models.CharField(max_length=20, unique=True, verbose_name='币种代码')),
                ('name', models.CharField(max_length=100, verbose_name='币种名称')),
                ('icon_url', models.URLField(blank=True, null=True, verbose_name='图标URL')),
                ('current_price', models.DecimalField(decimal_places=8, default=0, max_digits=30, verbose_name='当前价格')),
                ('manual_price', models.DecimalField(blank=True, decimal_places=8, max_digits=30, null=True, verbose_name='插针价格 (留空则使用当前价格)')),
                ('change_24h', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='24h 涨跌幅')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否启用')),
            ],
            options={
                'verbose_name': '加密货币',
                'verbose_name_plural': '加密货币管理',
            },
        ),
        migrations.AlterModelOptions(
            name='account',
            options={'verbose_name': '账户', 'verbose_name_plural': '账户管理'},
        ),
        migrations.AlterModelOptions(
            name='asset',
            options={'verbose_name': '资产', 'verbose_name_plural': '资产管理'},
        ),
        migrations.AlterModelOptions(
            name='ledger',
            options={'verbose_name': '账单', 'verbose_name_plural': '账单管理'},
        ),
        migrations.AlterModelOptions(
            name='order',
            options={'verbose_name': '订单', 'verbose_name_plural': '订单管理'},
        ),
        migrations.AddField(
            model_name='account',
            name='win_loss_control',
            field=models.IntegerField(default=0, help_text='控制胜率: -100 (必输) 到 100 (必赢), 0 为随机', verbose_name='输赢控制'),
        ),
        migrations.AlterField(
            model_name='account',
            name='account_type',
            field=models.CharField(choices=[('SIMULATED', '模拟账户'), ('REAL', '真实账户')], default='SIMULATED', max_length=20, verbose_name='账户类型'),
        ),
        migrations.AlterField(
            model_name='account',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='创建时间'),
        ),
        migrations.AlterField(
            model_name='asset',
            name='balance',
            field=models.DecimalField(decimal_places=8, default=0, max_digits=30, verbose_name='余额'),
        ),
        migrations.AlterField(
            model_name='asset',
            name='currency',
            field=models.CharField(max_length=10, verbose_name='币种'),
        ),
        migrations.AlterField(
            model_name='asset',
            name='frozen',
            field=models.DecimalField(decimal_places=8, default=0, max_digits=30, verbose_name='冻结'),
        ),
        migrations.AlterField(
            model_name='ledger',
            name='amount',
            field=models.DecimalField(decimal_places=8, max_digits=30, verbose_name='金额'),
        ),
        migrations.AlterField(
            model_name='ledger',
            name='balance_after',
            field=models.DecimalField(decimal_places=8, max_digits=30, verbose_name='变动后余额'),
        ),
        migrations.AlterField(
            model_name='ledger',
            name='balance_before',
            field=models.DecimalField(decimal_places=8, max_digits=30, verbose_name='变动前余额'),
        ),
        migrations.AlterField(
            model_name='ledger',
            name='biz_type',
            field=models.CharField(max_length=50, verbose_name='业务类型'),
        ),
        migrations.AlterField(
            model_name='ledger',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='创建时间'),
        ),
        migrations.AlterField(
            model_name='ledger',
            name='currency',
            field=models.CharField(max_length=10, verbose_name='币种'),
        ),
        migrations.AlterField(
            model_name='ledger',
            name='reference_id',
            field=models.CharField(blank=True, max_length=100, null=True, verbose_name='引用ID'),
        ),
        migrations.AlterField(
            model_name='order',
            name='amount',
            field=models.DecimalField(decimal_places=8, max_digits=30, verbose_name='数量'),
        ),
        migrations.AlterField(
            model_name='order',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='创建时间'),
        ),
        migrations.AlterField(
            model_name='order',
            name='filled_amount',
            field=models.DecimalField(decimal_places=8, default=0, max_digits=30, verbose_name='已成交数量'),
        ),
        migrations.AlterField(
            model_name='order',
            name='order_type',
            field=models.CharField(choices=[('LIMIT', '限价'), ('MARKET', '市价')], max_length=10, verbose_name='类型'),
        ),
        migrations.AlterField(
            model_name='order',
            name='price',
            field=models.DecimalField(blank=True, decimal_places=8, max_digits=30, null=True, verbose_name='价格'),
        ),
        migrations.AlterField(
            model_name='order',
            name='side',
            field=models.CharField(choices=[('BUY', '买入'), ('SELL', '卖出')], max_length=10, verbose_name='方向'),
        ),
        migrations.AlterField(
            model_name='order',
            name='status',
            field=models.CharField(choices=[('LIVE', '进行中'), ('PARTIALLY_FILLED', '部分成交'), ('FILLED', '已成交'), ('CANCELED', '已撤销')], default='LIVE', max_length=20, verbose_name='状态'),
        ),
        migrations.AlterField(
            model_name='order',
            name='symbol',
            field=models.CharField(default='BTC-USDT', max_length=20, verbose_name='交易对'),
        ),
    ]
