# Generated by Django 4.2.27 on 2026-06-17 21:18

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('rank', '0001_initial'),
        ('shop', '0001_initial'),
        ('products', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='shangpinzhuanqu',
            name='dianpu',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shop.dianpu', verbose_name='所属店铺'),
        ),
        migrations.AddField(
            model_name='shangpinzhuanqu',
            name='dianpu_leixing',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.shangpinleixingdianpu', verbose_name='店铺商品类型'),
        ),
        migrations.AddField(
            model_name='shangpinmeiritongji',
            name='shangpin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.shangpin', verbose_name='商品ID'),
        ),
        migrations.AddField(
            model_name='shangpinleixing',
            name='bankuai',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rank.bankuai', verbose_name='所属板块'),
        ),
        migrations.AddField(
            model_name='shangpin',
            name='dianpu',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shop.dianpu', verbose_name='所属店铺'),
        ),
        migrations.AddField(
            model_name='shangpin',
            name='dianpu_leixing',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.shangpinleixingdianpu', verbose_name='店铺商品类型'),
        ),
        migrations.AddIndex(
            model_name='huiyuangoumai',
            index=models.Index(fields=['yonghu_id'], name='huiyuangoum_yonghu__ba2138_idx'),
        ),
        migrations.AddIndex(
            model_name='huiyuangoumai',
            index=models.Index(fields=['huiyuan_id'], name='huiyuangoum_huiyuan_35fe1d_idx'),
        ),
        migrations.AddIndex(
            model_name='huiyuangoumai',
            index=models.Index(fields=['yonghu_id', 'huiyuan_id'], name='huiyuangoum_yonghu__21e6e1_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='huiyuangoumai',
            unique_together={('yonghu_id', 'huiyuan_id')},
        ),
        migrations.AddField(
            model_name='huiyuan',
            name='bankuai',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rank.bankuai', verbose_name='所属板块'),
        ),
        migrations.AddIndex(
            model_name='gsfenhong',
            index=models.Index(fields=['guanshi'], name='gsfenhong_guanshi_dc440f_idx'),
        ),
        migrations.AddIndex(
            model_name='gsfenhong',
            index=models.Index(fields=['dashouid'], name='gsfenhong_dashoui_5473ca_idx'),
        ),
        migrations.AddIndex(
            model_name='duocifenhong',
            index=models.Index(fields=['yonghuid'], name='duoci_fenho_yonghui_db6a2f_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='duocifenhong',
            unique_together={('huiyuan', 'yonghuid', 'cishu')},
        ),
        migrations.AddIndex(
            model_name='czjilu',
            index=models.Index(fields=['dingdan_id'], name='czjilu_dingdan_39bbd0_idx'),
        ),
        migrations.AddIndex(
            model_name='czjilu',
            index=models.Index(fields=['yonghuid'], name='czjilu_yonghui_a0555f_idx'),
        ),
        migrations.AddIndex(
            model_name='shangpinmeiritongji',
            index=models.Index(fields=['shangpin', 'riqi'], name='shangpin_me_shangpi_d27e5c_idx'),
        ),
        migrations.AddIndex(
            model_name='shangpinmeiritongji',
            index=models.Index(fields=['nian', 'yue', 'ri'], name='shangpin_me_nian_e3b409_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='shangpinmeiritongji',
            unique_together={('shangpin', 'riqi')},
        ),
    ]
