# Generated by Django 5.2.9 on 2026-01-21 12:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('wbfdm', '0037_relatedinstrumentthroughmodel_unique_instrument_relationship_and_more'),
        ('wbportfolio', '0095_portfolio_keep_only_essential_positions'),
    ]

    operations = [
        migrations.CreateModel(
            name='PortfolioTradableExchangeThroughModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rebalancing_adjustment_factor', models.FloatField(default=0)),
                ('exposure_adjustment_factor', models.FloatField(default=0)),
                ('exchange', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tradable_portfolio_relationships', to='wbfdm.exchange')),
                ('portfolio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tradable_exchange_relationships', to='wbportfolio.portfolio')),
            ],
            options={
                'verbose_name': 'Portfolio Tradeable Exchange',
                'verbose_name_plural': 'Portfolio Tradeable Exchanges',
                'constraints': [models.UniqueConstraint(fields=('portfolio', 'exchange'), name='unique_tradable_exchange_per_portfolio')],
            },
        ),
    ]
