Private
Public Access
sacamos referencia a empresa en la tbla de log y añado timestamps a los
repuestos
This commit is contained in:
1 parent
e4542e48e6
commit
7a68737be8
2 files changed
+11
-1
No files matched your search
@@ -1,5 +1,11 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
type Repuesto struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
@@ -10,7 +16,11 @@ type Repuesto struct {
|
||||
MarcaID string `gorm:"type:varchar(3);index" json:"marcaId"`
|
||||
Aliases []string `gorm:"type:json" json:"aliases,omitempty"`
|
||||
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:"-"`
|
||||
}
|
||||
|
||||
func (Repuesto) TableName() string {
|
||||
return "repuesto"
|
||||
}
|
||||
Reference in new issue
Block a user