feat: adapatadas entidades para que coinsidan con el modelo

This commit is contained in:
fede committed 2026-08-06 02:12:51 -03:00
1 parent de33352618
commit 152a40ca19
16 files changed
+105 -68

No files matched your search

+3 -8
View File
@@ -1,18 +1,13 @@
package models
import (
"time"
"gorm.io/gorm"
)
type Marca struct {
ID string `gorm:"primaryKey;type:varchar(3)" json:"id"`
Nombre string `gorm:"uniqueIndex;not null;type:varchar(70)" json:"nombre"`
Repuestos []Repuesto `gorm:"foreignKey:MarcaID"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
gorm.Model
Nombre string `gorm:"uniqueIndex;not null;type:varchar(70)" json:"nombre"`
Repuestos []Repuesto `gorm:"foreignKey:MarcaID" json:"repuestos"`
}
func (Marca) TableName() string {