From 5771070f245c964db0a263f7925dded84b3e5f5e Mon Sep 17 00:00:00 2001 From: cangui Date: Fri, 9 May 2025 16:06:29 +0200 Subject: [PATCH] ddffd --- backend/models/models.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/models/models.go b/backend/models/models.go index 0524c64..29eed3a 100644 --- a/backend/models/models.go +++ b/backend/models/models.go @@ -212,10 +212,12 @@ type Conversation struct { MessageID string `gorm:"uniqueIndex;not null"` Type string `gorm:"not null"` Content string `gorm:"type:text"` - Direction string `gorm:"not null"` // inbound/outbound - Status string `gorm:"type:varchar(20)"` // sent, delivered, read, failed + Direction string `gorm:"not null"` // inbound / outbound + Status string `gorm:"type:varchar(20)"` // sent, delivered, read, failed + ParentID *uint `gorm:"index"` // lien vers le message parent (nullable) } + func NewTextMessage(to string, body string) WhatsappMessage { return WhatsappMessage{ MessagingProduct: "whatsapp",