2025-06-05 16:54:05 +08:00
|
|
|
# Generated by Django 5.2.1 on 2025-06-05 07:55
|
2025-06-03 18:25:20 +08:00
|
|
|
|
|
|
|
import django.db.models.deletion
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2025-06-05 16:54:05 +08:00
|
|
|
('brands', '0002_alter_campaign_dataset_id_alter_product_dataset_id'),
|
2025-06-03 18:25:20 +08:00
|
|
|
('chat', '0001_initial'),
|
2025-06-05 16:54:05 +08:00
|
|
|
('daren_detail', '0002_delete_brandcampaign'),
|
2025-06-03 18:25:20 +08:00
|
|
|
('expertproducts', '0001_initial'),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='NegotiationChat',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('conversation_id', models.CharField(db_index=True, max_length=100, unique=True)),
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
2025-06-05 16:54:05 +08:00
|
|
|
('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='daren_detail.creatorprofile')),
|
2025-06-03 18:25:20 +08:00
|
|
|
('negotiation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chats', to='expertproducts.negotiation')),
|
2025-06-05 16:54:05 +08:00
|
|
|
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='brands.product')),
|
2025-06-03 18:25:20 +08:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ['-updated_at'],
|
2025-06-05 16:54:05 +08:00
|
|
|
'indexes': [models.Index(fields=['negotiation', 'updated_at'], name='chat_negoti_negotia_2aa711_idx'), models.Index(fields=['creator_id', 'product_id'], name='chat_negoti_creator_0506f5_idx')],
|
2025-06-03 18:25:20 +08:00
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|