# Generated by Django 4.2.20 on 2025-11-04 12:46

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('unicrm', '0007_auto_enroll_and_status'),
    ]

    operations = [
        migrations.RenameIndex(
            model_name='communicationmessage',
            new_name='unicrm_comm_status_2f3c8e_idx',
            old_name='unicrm_msg_status_sched_idx',
        ),
        migrations.AddField(
            model_name='communicationmessage',
            name='has_received_reply',
            field=models.BooleanField(default=False, help_text='True when the recipient sent a reply in the linked chat/email thread.', verbose_name='Has received reply'),
        ),
        migrations.AddField(
            model_name='communicationmessage',
            name='replied_at',
            field=models.DateTimeField(blank=True, help_text='Timestamp of the most recent reply detected for this delivery.', null=True, verbose_name='Replied at'),
        ),
        migrations.AlterField(
            model_name='communication',
            name='status',
            field=models.CharField(choices=[('draft', 'Draft'), ('scheduled', 'Scheduled'), ('sending', 'Sending'), ('completed', 'Completed'), ('ongoing', 'Ongoing'), ('cancelled', 'Cancelled')], default='draft', max_length=20, verbose_name='Status'),
        ),
        migrations.AddIndex(
            model_name='communicationmessage',
            index=models.Index(fields=['has_received_reply'], name='unicrm_comm_has_rec_6053bd_idx'),
        ),
    ]
