# Generated by Django 5.2.14 on 2026-06-30 21:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('eveuniverse', '0012_alter_evebloodline_eve_ship_type'),
        ('memberaudit', '0020_add_new_roles'),
        ('shop', '0003_shop_enabled_sections'),
    ]

    operations = [
        migrations.CreateModel(
            name='HullListing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.PositiveBigIntegerField(default=0)),
                ('stock', models.PositiveIntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('eve_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='eveuniverse.evetype')),
                ('shop', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hull_listings', to='shop.shop')),
            ],
        ),
        migrations.CreateModel(
            name='HullListingSource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('container_item_id', models.PositiveBigIntegerField(blank=True, null=True)),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='memberaudit.character')),
                ('listing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sources', to='shop.hulllisting')),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='memberaudit.location')),
            ],
        ),
        migrations.AddConstraint(
            model_name='hulllisting',
            constraint=models.UniqueConstraint(fields=('shop', 'eve_type'), name='uniq_shop_hull'),
        ),
    ]
