Private
Public Access
feat: añadido campo de Email nulable a cliente
This commit is contained in:
1 parent
4085adc6c2
commit
3f3175b615
1 file changed
+6
-3
@@ -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"`
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user