# Generated by Django 6.0.5 on 2026-05-31 11:58

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Bot',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=255)),
                ('description', models.TextField()),
                ('category', models.CharField(db_index=True, max_length=50)),
                ('pairs', models.JSONField(default=list, help_text='Currency pairs the bot trades')),
                ('timeframe', models.CharField(help_text='Trading timeframe (e.g., M5, H1, D1)', max_length=10)),
                ('win_rate', models.FloatField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('total_trades', models.IntegerField(validators=[django.core.validators.MinValueValidator(0)])),
                ('avg_profit', models.FloatField()),
                ('max_drawdown', models.FloatField(validators=[django.core.validators.MinValueValidator(0)])),
                ('monthly_return', models.FloatField()),
                ('sharpe_ratio', models.FloatField()),
                ('price', models.DecimalField(decimal_places=2, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])),
                ('plan', models.CharField(choices=[('Basic', 'Basic'), ('Pro', 'Pro'), ('VIP', 'VIP')], db_index=True, max_length=20)),
                ('status', models.CharField(choices=[('active', 'Active'), ('beta', 'Beta'), ('inactive', 'Inactive')], db_index=True, max_length=20)),
                ('backtest_years', models.IntegerField(validators=[django.core.validators.MinValueValidator(0)])),
                ('badge', models.CharField(blank=True, max_length=100)),
                ('tags', models.JSONField(default=list)),
                ('chart_data', models.JSONField(default=list, help_text='Performance chart data points')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['status', 'plan'], name='base_bot_status_0d0a07_idx'), models.Index(fields=['category', 'status'], name='base_bot_categor_ce36ff_idx')],
            },
        ),
        migrations.CreateModel(
            name='ForexPair',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pair', models.CharField(db_index=True, max_length=10, unique=True)),
                ('base', models.CharField(max_length=5)),
                ('quote', models.CharField(max_length=5)),
                ('price', models.DecimalField(decimal_places=5, max_digits=15)),
                ('change', models.DecimalField(decimal_places=6, max_digits=15)),
                ('change_pct', models.FloatField()),
                ('bid', models.DecimalField(decimal_places=5, max_digits=15)),
                ('ask', models.DecimalField(decimal_places=5, max_digits=15)),
                ('spread', models.FloatField()),
                ('high', models.DecimalField(decimal_places=5, max_digits=15)),
                ('low', models.DecimalField(decimal_places=5, max_digits=15)),
                ('volume', models.CharField(max_length=50)),
                ('trend', models.CharField(choices=[('up', 'Uptrend'), ('down', 'Downtrend'), ('sideways', 'Sideways')], db_index=True, max_length=20)),
                ('category', models.CharField(choices=[('major', 'Major'), ('cross', 'Cross'), ('commodity', 'Commodity'), ('exotic', 'Exotic')], db_index=True, max_length=50)),
                ('sentiment', models.IntegerField(help_text='Sentiment score 0-100', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('symbol1', models.CharField(max_length=10)),
                ('symbol2', models.CharField(max_length=10)),
                ('color1', models.CharField(max_length=50)),
                ('color2', models.CharField(max_length=50)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['pair'],
                'indexes': [models.Index(fields=['category', 'sentiment'], name='base_forexp_categor_a56ffa_idx'), models.Index(fields=['trend'], name='base_forexp_trend_ddfdd2_idx')],
            },
        ),
        migrations.CreateModel(
            name='LeaderboardEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rank', models.IntegerField(db_index=True, validators=[django.core.validators.MinValueValidator(1)])),
                ('user_name', models.CharField(db_index=True, max_length=255)),
                ('avatar', models.URLField()),
                ('monthly_return', models.FloatField()),
                ('win_rate', models.FloatField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('total_trades', models.IntegerField(validators=[django.core.validators.MinValueValidator(0)])),
                ('profit', models.DecimalField(decimal_places=2, max_digits=15)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True, db_index=True)),
            ],
            options={
                'ordering': ['rank'],
                'indexes': [models.Index(fields=['user_name'], name='base_leader_user_na_650f0a_idx')],
                'unique_together': {('rank',)},
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=255)),
                ('description', models.TextField()),
                ('category', models.CharField(db_index=True, max_length=50)),
                ('difficulty', models.CharField(choices=[('beginner', 'Beginner'), ('intermediate', 'Intermediate'), ('advanced', 'Advanced')], db_index=True, max_length=20)),
                ('image_url', models.URLField()),
                ('video_url', models.URLField(blank=True)),
                ('content', models.TextField()),
                ('duration_minutes', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('order', models.IntegerField(validators=[django.core.validators.MinValueValidator(0)])),
                ('tags', models.JSONField(default=list)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['order', 'created_at'],
                'indexes': [models.Index(fields=['category', 'difficulty'], name='base_lesson_categor_0c204d_idx')],
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=500)),
                ('content', models.TextField()),
                ('source', models.CharField(max_length=100)),
                ('image_url', models.URLField()),
                ('category', models.CharField(db_index=True, max_length=50)),
                ('impact', models.CharField(choices=[('high', 'High'), ('medium', 'Medium'), ('low', 'Low')], db_index=True, max_length=20)),
                ('related_pairs', models.JSONField(default=list)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('published_at', models.DateTimeField(db_index=True)),
            ],
            options={
                'ordering': ['-published_at'],
                'indexes': [models.Index(fields=['category', 'impact'], name='base_news_categor_c64cd4_idx'), models.Index(fields=['source'], name='base_news_source_48017d_idx')],
            },
        ),
        migrations.CreateModel(
            name='Signal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pair', models.CharField(db_index=True, max_length=20)),
                ('signal_type', models.CharField(choices=[('buy', 'Buy'), ('sell', 'Sell'), ('hold', 'Hold')], db_index=True, max_length=10)),
                ('confidence', models.IntegerField(help_text='Signal confidence 0-100', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('entry_price', models.DecimalField(decimal_places=5, max_digits=15)),
                ('stop_loss', models.DecimalField(decimal_places=5, max_digits=15)),
                ('take_profit', models.DecimalField(decimal_places=5, max_digits=15)),
                ('reason', models.TextField()),
                ('chart_pattern', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('expires_at', models.DateTimeField(db_index=True)),
            ],
            options={
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['pair', 'signal_type'], name='base_signal_pair_2dda04_idx'), models.Index(fields=['expires_at'], name='base_signal_expires_17b193_idx')],
            },
        ),
        migrations.CreateModel(
            name='Testimonial',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author_name', models.CharField(max_length=255)),
                ('author_title', models.CharField(max_length=255)),
                ('author_image', models.URLField()),
                ('content', models.TextField()),
                ('rating', models.IntegerField(choices=[(1, '⭐'), (2, '⭐⭐'), (3, '⭐⭐⭐'), (4, '⭐⭐⭐⭐'), (5, '⭐⭐⭐⭐⭐')], validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(5)])),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
            ],
            options={
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['rating'], name='base_testim_rating_de0005_idx')],
            },
        ),
    ]
