diff --git a/backend/chat/migrations/0002_conversation_summary.py b/backend/chat/migrations/0002_conversation_summary.py new file mode 100644 index 000000000..3b4fa2cc0 --- /dev/null +++ b/backend/chat/migrations/0002_conversation_summary.py @@ -0,0 +1,18 @@ +# Generated by Django 6.0.1 on 2026-01-28 22:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chat', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='conversation', + name='summary', + field=models.TextField(blank=True, help_text='Auto-generated summary of the conversation', null=True), + ), + ] diff --git a/backend/chat/models.py b/backend/chat/models.py index 242788f14..a960dea96 100644 --- a/backend/chat/models.py +++ b/backend/chat/models.py @@ -15,6 +15,13 @@ def __str__(self): class Conversation(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) title = models.CharField(max_length=100, blank=False, null=False, default="Mock title") + + summary = models.TextField( + blank=True, + null=True, + help_text="Auto-generated summary of the conversation" + ) + created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True) active_version = models.ForeignKey( @@ -22,7 +29,6 @@ class Conversation(models.Model): ) deleted_at = models.DateTimeField(null=True, blank=True) user = models.ForeignKey(CustomUser, on_delete=models.CASCADE) - def __str__(self): return self.title