# Generated by Django 4.1.10 on 2023-10-04 07:55

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


class Migration(migrations.Migration):
    dependencies = [
        ("currency", "0001_initial"),
        ("geography", "0001_initial"),
        ("wbfdm", "0006_instrument_officer_backend"),
    ]

    operations = [
        migrations.AddField(
            model_name="instrument",
            name="country",
            field=models.ForeignKey(
                blank=True,
                limit_choices_to={"level": 1},
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="geography.geography",
            ),
        ),
        migrations.AddField(
            model_name="instrument",
            name="currency",
            field=models.ForeignKey(
                blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="currency.currency"
            ),
        ),
        migrations.AddField(
            model_name="instrument",
            name="delisted_date",
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="instrument",
            name="description",
            field=models.TextField(default=""),
        ),
        migrations.AddField(
            model_name="instrument",
            name="inception_date",
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="instrument",
            name="instrument_type",
            field=models.CharField(
                blank=True,
                choices=[
                    ("ADR", "American Depository Receipt (ADR)"),
                    ("CF", "Close Ended Fund"),
                    ("EQ", "Equity"),
                    ("ETF", "Exchange Traded Fund"),
                    ("ETC", "Exchange Traded Commodity"),
                    ("ETN", "Exchange Traded Note"),
                    ("WARRANT", "Warrant"),
                    ("GDR", "Global Depository Receipt (GDR)"),
                    ("GS", "Genussschein"),
                    ("TRUST", "Investment Trust"),
                    ("NVDR", "Non-voting depository receipt (NVDR)"),
                    ("PREF", "Preference Share"),
                ],
                max_length=8,
                null=True,
            ),
        ),
        migrations.AddField(
            model_name="instrument",
            name="officer_backend",
            field=wbfdm.models.fk_fields.CompositeForeignKey(
                null=True,
                null_if_equal=[],
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="wbfdm.instrumentlookup",
                to_fields={
                    "instrument_id": wbfdm.models.fk_fields.LocalFieldValue("id"),
                    "officers": wbfdm.models.fk_fields.RawFieldValue(True),
                },
            ),
        ),
        migrations.AddField(
            model_name="instrument",
            name="source",
            field=models.CharField(blank=True, max_length=64, null=True),
        ),
        migrations.AddField(
            model_name="instrument",
            name="source_id",
            field=models.CharField(blank=True, max_length=64, null=True),
        ),
        migrations.AddField(
            model_name="instrumentlookup",
            name="esg",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="instrument",
            name="esg_backend",
            field=wbfdm.models.fk_fields.CompositeForeignKey(
                null=True,
                null_if_equal=[],
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="wbfdm.instrumentlookup",
                to_fields={
                    "esg": wbfdm.models.fk_fields.RawFieldValue(True),
                    "instrument_id": wbfdm.models.fk_fields.LocalFieldValue("id"),
                },
            ),
        ),
    ]
