39 lines
2.1 KiB
Python
39 lines
2.1 KiB
Python
# Generated by Django 5.2.15 on 2026-07-27 02:44
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('tickets', '0007_ticketdraftmaterial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='TicketMessageTimelineItem',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('sequence', models.PositiveIntegerField()),
|
|
('speaker', models.CharField(blank=True, max_length=120)),
|
|
('role', models.CharField(default='unknown', max_length=24)),
|
|
('content', models.TextField()),
|
|
('occurred_at', models.DateTimeField(blank=True, null=True)),
|
|
('occurred_at_raw', models.CharField(blank=True, max_length=120)),
|
|
('source_ref', models.CharField(blank=True, max_length=160)),
|
|
('confidence', models.DecimalField(blank=True, decimal_places=4, max_digits=5, null=True)),
|
|
('conflict', models.TextField(blank=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('draft', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='timeline_items', to='tickets.ticketdraft')),
|
|
('source_material', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='message_timeline_items', to='tickets.ticketdraftmaterial')),
|
|
('ticket', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='message_timeline_items', to='tickets.ticket')),
|
|
],
|
|
options={
|
|
'ordering': ['sequence'],
|
|
'indexes': [models.Index(fields=['ticket', 'sequence'], name='tickets_tic_ticket__20b0c4_idx'), models.Index(fields=['draft', 'sequence'], name='tickets_tic_draft_i_0adfa1_idx')],
|
|
'constraints': [models.UniqueConstraint(fields=('draft', 'sequence'), name='unique_ticket_draft_timeline_sequence')],
|
|
},
|
|
),
|
|
]
|