# Generated by Django 5.2.7 on 2026-02-04 15:06

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='MemberOfParliament',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('party', models.CharField(max_length=100)),
                ('constituency', models.CharField(max_length=255)),
                ('province', models.CharField(max_length=100)),
                ('image_url', models.URLField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TradeDisclosure',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ticker', models.CharField(max_length=20)),
                ('company_name', models.CharField(max_length=255)),
                ('trade_type', models.CharField(choices=[('BUY', 'Buy'), ('SELL', 'Sell'), ('HOLD', 'Hold')], max_length=10)),
                ('amount_range', models.CharField(max_length=100)),
                ('disclosure_date', models.DateField()),
                ('transaction_date', models.DateField(blank=True, null=True)),
                ('mp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trades', to='core.memberofparliament')),
            ],
        ),
        migrations.CreateModel(
            name='Watchlist',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ticker', models.CharField(blank=True, max_length=20, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('mp', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.memberofparliament')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='watchlist', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('user', 'mp', 'ticker')},
            },
        ),
    ]
