# Generated by Django 5.2.7 on 2025-10-07 11:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('crm', '0001_initial'),
        ('subscriptions', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='campaign',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='campaigns_created', to='subscriptions.profile'),
        ),
        migrations.AddField(
            model_name='collectiondata',
            name='assigned_to',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='collection_assigned_to', to='subscriptions.salespersons'),
        ),
        migrations.AddField(
            model_name='collectiondata',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='created_collections', to='subscriptions.profile'),
        ),
        migrations.AddField(
            model_name='collectiondata',
            name='profiles',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='collections', to='subscriptions.profile'),
        ),
        migrations.AddField(
            model_name='activatecustomer',
            name='invoice',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activate_customers', to='crm.invoice'),
        ),
        migrations.AddField(
            model_name='invoiceitem',
            name='invoice',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='crm.invoice'),
        ),
        migrations.AddField(
            model_name='lead',
            name='assigned_to',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assigned_leads', to='subscriptions.salespersons'),
        ),
        migrations.AddField(
            model_name='lead',
            name='collections',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='leads', to='crm.collectiondata'),
        ),
        migrations.AddField(
            model_name='lead',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='created_leads', to='subscriptions.profile'),
        ),
        migrations.AddField(
            model_name='invoice',
            name='lead',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoices', to='crm.lead'),
        ),
        migrations.AddField(
            model_name='activatecustomer',
            name='lead',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activate_customers', to='crm.lead'),
        ),
        migrations.AddField(
            model_name='invoice',
            name='office',
            field=models.ForeignKey(blank=True, help_text='Office location for this invoice', null=True, on_delete=django.db.models.deletion.SET_NULL, to='crm.office'),
        ),
        migrations.AddField(
            model_name='payment',
            name='invoice',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='crm.invoice'),
        ),
        migrations.AddField(
            model_name='quote',
            name='lead',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='quotes', to='crm.lead'),
        ),
        migrations.AddField(
            model_name='quote',
            name='office',
            field=models.ForeignKey(blank=True, help_text='Office location for this quote', null=True, on_delete=django.db.models.deletion.SET_NULL, to='crm.office'),
        ),
        migrations.AddField(
            model_name='invoice',
            name='quote',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='crm.quote'),
        ),
        migrations.AddField(
            model_name='quoteitem',
            name='quote',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='crm.quote'),
        ),
    ]
