up
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user