Private
Public Access
feat: logs para cuando le volves a dar el alta a un repuesto
This commit is contained in:
1 parent
c906dd4511
commit
6d123ea01d
13 files changed
+215
-7
No files matched your search
@@ -7,9 +7,8 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
type Repuesto struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
Nombre string `gorm:"type:varchar(50);not null" json:"nombre" binding:"required"`
|
||||
Precio float64 `gorm:"not null;type:decimal(10,2)" json:"precio" binding:"required"`
|
||||
StockMinimo int64 `gorm:"not null;type:bigint" json:"stockMinimo" binding:"required"`
|
||||
@@ -19,7 +18,7 @@ type Repuesto struct {
|
||||
Stocks []Stock `gorm:"foreignKey:RepuestoID" json:"stocks,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"`
|
||||
}
|
||||
|
||||
func (Repuesto) TableName() string {
|
||||
|
||||
Reference in new issue
Block a user