feat(channels): align whatsapp calls api

This commit is contained in:
2026-06-06 21:49:59 +08:00
parent 4736d67839
commit e730b28bbd
13 changed files with 1111 additions and 17 deletions
+4 -1
View File
@@ -16,6 +16,9 @@ func NewWhatsAppCallRepo(db *gorm.DB) *WhatsAppCallRepo {
return &WhatsAppCallRepo{db: db}
}
// DB returns the underlying GORM handle for Chatwoot call parity queries.
func (r *WhatsAppCallRepo) DB() *gorm.DB { return r.db }
func (r *WhatsAppCallRepo) Create(ctx context.Context, call *model.WhatsAppCall) error {
return r.db.WithContext(ctx).Create(call).Error
}
@@ -41,4 +44,4 @@ func (r *WhatsAppCallRepo) Update(ctx context.Context, call *model.WhatsAppCall)
func (r *WhatsAppCallRepo) Delete(ctx context.Context, id uint) error {
return r.db.WithContext(ctx).Delete(&model.WhatsAppCall{}, id).Error
}
}