# Generated by Django 4.1.9 on 2023-06-14 07:31

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Instrument",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=512)),
            ],
            options={
                "verbose_name": "Instrument",
                "verbose_name_plural": "Instruments",
            },
        ),
        migrations.CreateModel(
            name="InstrumentLookup",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("identifier", models.CharField(max_length=64)),
                ("backend_path", models.CharField(max_length=265)),
                ("prices", models.BooleanField(default=False)),
                ("dividends", models.BooleanField(default=False)),
                ("corporate_actions", models.BooleanField(default=False)),
                ("statements", models.BooleanField(default=False)),
                ("estimates", models.BooleanField(default=False)),
                ("officers", models.BooleanField(default=False)),
                (
                    "instrument",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, related_name="lookups", to="wbfdm.instrument"
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="InstrumentIdentifier",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("identifier", models.CharField(max_length=32)),
                (
                    "identifier_type",
                    models.CharField(
                        choices=[
                            ("ISIN", "ISIN"),
                            ("RIC", "RIC"),
                            ("BBG", "BBG"),
                            ("TICKER", "Ticker"),
                            ("VALOREN", "Valoren"),
                            ("WKN", "WKN"),
                        ],
                        max_length=32,
                    ),
                ),
                (
                    "instrument",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, related_name="identifiers", to="wbfdm.instrument"
                    ),
                ),
            ],
        ),
    ]
