# Generated by Django 4.2.29 on 2026-04-02 11:08

from decimal import Decimal
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Lead',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('client_name', models.CharField(max_length=255)),
                ('client_email', models.EmailField(blank=True, max_length=254)),
                ('client_phone', models.CharField(blank=True, max_length=20)),
                ('client_whatsapp', models.CharField(blank=True, max_length=20)),
                ('service_type', models.CharField(choices=[('Tech', 'Technology'), ('Cyber', 'Cybersecurity'), ('Legal', 'Legal'), ('Mixed', 'Mixed Services')], max_length=10)),
                ('lead_source', models.CharField(choices=[('referral', 'Referral'), ('cold_outreach', 'Cold Outreach'), ('website', 'Website'), ('social_media', 'Social Media'), ('event', 'Event / Conference'), ('other', 'Other')], default='other', max_length=20)),
                ('requirements', models.TextField(blank=True, help_text='Rich text HTML')),
                ('proposed_budget', models.DecimalField(decimal_places=2, default=Decimal('0.00'), help_text='Client proposed budget in PKR', max_digits=12)),
                ('deadline', models.DateField(blank=True, null=True)),
                ('priority', models.CharField(choices=[('Low', 'Low'), ('Medium', 'Medium'), ('High', 'High'), ('Urgent', 'Urgent')], default='Medium', max_length=10)),
                ('status', models.CharField(choices=[('New', 'New'), ('Qualified', 'Qualified'), ('Requirements_Submitted', 'Requirements Submitted'), ('Internal_Review', 'Internal Review'), ('Client_Meeting', 'Client Meeting Scheduled'), ('Costing_In_Progress', 'Costing In Progress'), ('Proposal_Ready', 'Proposal Ready'), ('Pending_Approval', 'Pending Approval'), ('Approved', 'Approved'), ('Rejected', 'Rejected'), ('On_Hold', 'On Hold')], default='New', max_length=25)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='LeadActivity',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action', models.CharField(max_length=100)),
                ('details', models.TextField(blank=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name_plural': 'Lead Activities',
                'ordering': ['-timestamp'],
            },
        ),
        migrations.CreateModel(
            name='LeadAttachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='lead_attachments/')),
                ('file_name', models.CharField(blank=True, max_length=255)),
                ('file_size', models.PositiveIntegerField(default=0, help_text='Size in bytes')),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-uploaded_at'],
            },
        ),
        migrations.CreateModel(
            name='Meeting',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('meeting_type', models.CharField(choices=[('internal', 'Internal Meeting'), ('client', 'Client Meeting')], max_length=10)),
                ('date', models.DateField()),
                ('time', models.TimeField()),
                ('mode', models.CharField(choices=[('in_person', 'In Person'), ('video', 'Video Call'), ('phone', 'Phone Call')], default='video', max_length=10)),
                ('agenda', models.TextField(blank=True)),
                ('notes', models.TextField(blank=True)),
                ('outcome', models.CharField(choices=[('proceed', 'Proceed'), ('revise', 'Revise Requirements'), ('drop', 'Drop'), ('pending', 'Pending')], default='pending', max_length=10)),
                ('is_completed', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-date', '-time'],
            },
        ),
    ]
