Private
Public Access
feat: adapatadas entidades para que coinsidan con el modelo
This commit is contained in:
1 parent
de33352618
commit
152a40ca19
16 files changed
+105
-68
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user