# Generated by Django 5.1.4 on 2025-01-16 13:06

import django.contrib.postgres.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('system_settings', '0002_rename_is_enabled_systemsetting_is_active'),
    ]

    operations = [
        migrations.CreateModel(
            name='TradingPlatformServer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('platform', models.CharField(choices=[('mt5', 'MetaTrader 5'), ('mt4', 'MetaTrader 4'), ('vertex', 'Vertex')], max_length=10)),
                ('ips', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=15), help_text='List of IP addresses for the server', size=None)),
                ('type', models.CharField(choices=[('demo', 'Demo'), ('live', 'Live')], max_length=4)),
                ('username', models.IntegerField(help_text='Platform Manager account login number')),
                ('is_active', models.BooleanField(default=True)),
                ('error_log', models.TextField(blank=True, null=True)),
                ('description', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Trading Platform Server',
                'verbose_name_plural': 'Trading Platform Servers',
                'db_table': 'system_trading_platform_server',
                'permissions': [('view_trading_platform_server', 'Can view trading platform server'), ('add_trading_platform_server', 'Can add trading platform server'), ('change_trading_platform_server', 'Can change trading platform server'), ('delete_trading_platform_server', 'Can delete trading platform server'), ('enable_trading_platform_server', 'Can enable trading platform server'), ('disable_trading_platform_server', 'Can disable trading platform server'), ('view_trading_platform_config', 'Can view trading platform config')],
            },
        ),
    ]
