This commit is contained in:
cangui 2025-05-09 16:06:29 +02:00
parent f47da5f2ce
commit 5771070f24

View File

@ -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",