# Generated by Django 4.2.21 on 2025-06-28 08:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0015_alter_crmuser_options'),
        ('customers', '0014_alter_customer_options'),
        ('ib_commission', '0006_ibonboardingstatus_creation_source'),
    ]

    operations = [
        migrations.CreateModel(
            name='IBQuestionnaire',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('created_by', models.CharField(blank=True, max_length=255, null=True)),
                ('updated_by', models.CharField(blank=True, max_length=255, null=True)),
                ('target_countries', models.JSONField(help_text='List of country codes the IB plans to target')),
                ('expected_clients', models.IntegerField(help_text='Expected number of clients per month')),
                ('have_site', models.CharField(help_text='Whether IB has a website/platform', max_length=255)),
                ('get_client', models.TextField(help_text='How the IB plans to acquire clients')),
                ('ref_other', models.TextField(blank=True, help_text='Previous experience or other referral information')),
                ('source', models.CharField(choices=[('CP', 'Client Portal'), ('CRM', 'CRM')], help_text='Where the questionnaire was submitted from', max_length=10)),
                ('submitted_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='ib_questionnaire', to='customers.customer')),
                ('submitted_by', models.ForeignKey(blank=True, help_text='CRM user who submitted on behalf of IB (if source=CRM)', null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.crmuser')),
            ],
            options={
                'verbose_name': 'IB Questionnaire',
                'verbose_name_plural': 'IB Questionnaires',
                'db_table': 'ib_questionnaire',
            },
        ),
    ]
