# Generated by Django 5.2 on 2025-06-30 13:55

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0052_outboundmessageattempt_and_more'),
    ]

    operations = [
        migrations.AlterField(
            model_name='persistentagentcommsendpoint',
            name='owner_agent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comms_endpoints', to='api.persistentagent'),
        ),
        migrations.AlterField(
            model_name='persistentagentconversation',
            name='owner_agent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='owned_conversations', to='api.persistentagent'),
        ),
        migrations.AlterField(
            model_name='persistentagentconversationparticipant',
            name='endpoint',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversation_memberships', to='api.persistentagentcommsendpoint'),
        ),
        migrations.AlterField(
            model_name='persistentagentmessage',
            name='conversation',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='api.persistentagentconversation'),
        ),
        migrations.AlterField(
            model_name='persistentagentmessage',
            name='from_endpoint',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages_sent', to='api.persistentagentcommsendpoint'),
        ),
        migrations.AlterField(
            model_name='persistentagentmessage',
            name='owner_agent',
            field=models.ForeignKey(blank=True, help_text='The persistent agent this message ultimately belongs to (derived from conversation or endpoint)', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='agent_messages', to='api.persistentagent'),
        ),
        migrations.AlterField(
            model_name='persistentagentmessage',
            name='to_endpoint',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='messages_received', to='api.persistentagentcommsendpoint'),
        ),
    ]
