# Generated by Django 6.0.3 on 2026-03-16 18:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Coin',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('symbol', models.CharField(max_length=20)),
                ('current_price', models.DecimalField(decimal_places=8, default=0, max_digits=20)),
                ('image', models.ImageField(blank=True, null=True, upload_to='coin_images/')),
                ('description', models.TextField(blank=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_featured', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Coin',
                'verbose_name_plural': 'Coins',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='TradingSignal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('signal_type', models.CharField(choices=[('BUY', 'Buy'), ('SELL', 'Sell')], max_length=10)),
                ('entry_price', models.DecimalField(decimal_places=8, max_digits=20)),
                ('target_price', models.DecimalField(decimal_places=8, max_digits=20)),
                ('stop_loss', models.DecimalField(decimal_places=8, max_digits=20)),
                ('status', models.CharField(choices=[('ACTIVE', 'Active'), ('COMPLETED', 'Completed'), ('CANCELLED', 'Cancelled'), ('EXPIRED', 'Expired')], default='ACTIVE', max_length=20)),
                ('description', models.TextField(blank=True)),
                ('notes', models.TextField(blank=True)),
                ('result_price', models.DecimalField(blank=True, decimal_places=8, max_digits=20, null=True)),
                ('result_percentage', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('completed_at', models.DateTimeField(blank=True, null=True)),
                ('coin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='signals', to='signals.coin')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_signals', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Trading Signal',
                'verbose_name_plural': 'Trading Signals',
                'ordering': ['-created_at'],
            },
        ),
    ]
