This commit is contained in:
Lizandro Guarnizo
2026-05-13 22:05:20 -05:00
parent 381425b7e6
commit 9bcddcf1ea
4 changed files with 28 additions and 4 deletions
+5 -3
View File
@@ -21,6 +21,7 @@ type NotificacionLog struct {
Asunto string `json:"asunto" gorm:"column:asunto"`
PreviewHTML string `json:"preview_html" gorm:"column:preview_html;type:text"`
Pasarela string `json:"pasarela" gorm:"column:pasarela;type:varchar(20)"` // bold | dlocal | (vacío para correos de aviso)
EnlacePago string `json:"enlace_pago" gorm:"column:enlace_pago;type:text"` // URL del link de pago generado en este envío
}
func (NotificacionLog) TableName() string { return "notificaciones_log" }
@@ -74,9 +75,10 @@ func CreateNotificacionLog(n NotificacionLog) (*NotificacionLog, error) {
func UpdateNotificacionLog(n NotificacionLog) error {
return app.Http.Database.DB.Model(&n).Updates(map[string]interface{}{
"estado": n.Estado,
"error_msg": n.ErrorMsg,
"pasarela": n.Pasarela,
"estado": n.Estado,
"error_msg": n.ErrorMsg,
"pasarela": n.Pasarela,
"enlace_pago": n.EnlacePago,
}).Error
}
+1
View File
@@ -232,6 +232,7 @@ func EnviarNotificacionGrupo(regla *models.NotificacionRegla, cliente *models.Cl
Asunto: p.Asunto,
PreviewHTML: html,
Pasarela: pasarela,
EnlacePago: enlacePago,
}
savedLog, err := models.CreateNotificacionLog(logEntry)
if err != nil {