feat: añadido campo de Email nulable a cliente

This commit is contained in:
fede committed 2026-08-21 17:16:49 -03:00
1 parent 4085adc6c2
commit 3f3175b615
1 file changed
+6 -3
+6 -3
View File
@@ -1,12 +1,15 @@
package models package models
import ( import (
"database/sql"
"gorm.io/gorm" "gorm.io/gorm"
) )
type Cliente struct { type Cliente struct {
gorm.Model gorm.Model
Nombre string `gorm:"type:varchar(40)" json:"nombre"` Nombre string `gorm:"type:varchar(40)" json:"nombre"`
Facturas []Factura `gorm:"foreignKey:facturaID" json:"facturas,omitempty"` Email sql.NullString `gorm:"type:varchar(80)" json:"email"`
Recibos []Recibo `gorm:"foreignKey:reciboID"` Facturas []Factura `gorm:"foreignKey:facturaID" json:"facturas,omitempty"`
Recibos []Recibo `gorm:"foreignKey:reciboID"`
} }