Private
Public Access
commit parcial: refactor de decorator factura, añadida parcialemnte
funcionalidad de facturas tengo sueño Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
1 parent
3c4bc5c008
commit
42bf987ffc
19 files changed
+525
-37
No files matched your search
+11
-3
@@ -1,15 +1,23 @@
|
||||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Pago struct {
|
||||
gorm.Model
|
||||
EmpresaID uint `gorm:"not null;default:1;index" json:"empresaId"`
|
||||
FacturaID uint `gorm:"column:facturaId;index" json:"facturaId"`
|
||||
Factura *Factura `gorm:"foreignKey:FacturaID" json:"factura,omitempty"`
|
||||
FormaDePagoID uint `gorm:"column:formaDePagoID"`
|
||||
FormaDePago FormaDePago `gorm:"foreignKey:FormaDePagoID"`
|
||||
ReciboID uint `json:"reciboId"`
|
||||
Recibo Recibo `gorm:"foreignKey:ReciboID" json:"recibo,omitempty"`
|
||||
ReciboID *uint `json:"reciboId,omitempty"`
|
||||
Recibo *Recibo `gorm:"foreignKey:ReciboID" json:"recibo,omitempty"`
|
||||
Importe float64 `gorm:"type:decimal(10,2)"`
|
||||
Fecha time.Time `gorm:"not null" json:"fecha"`
|
||||
Observacion string `gorm:"type:varchar(255)" json:"observacion,omitempty"`
|
||||
}
|
||||
|
||||
func (Pago) TableName() string {
|
||||
|
||||
Reference in new issue
Block a user