Private
Public Access
avance creando entidades
This commit is contained in:
1 parent
1d755376f6
commit
7cadb9c84b
25 files changed
+200
-47
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
type Stock struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
ProductoID uint64 `gorm:"index;not null" json:"productoId"`
|
||||
CajonID string `gorm:"type:varchar(30);index;not null" json:"cajonId"`
|
||||
Cantidad uint `gorm:"not null;default:0" json:"cantidad"`
|
||||
|
||||
Producto Producto `gorm:"foreignKey:ProductoID" json:"producto,omitempty"`
|
||||
Cajon Cajon `gorm:"foreignKey:CajonID" json:"cajon,omitempty"`
|
||||
}
|
||||
|
||||
func (Stock) TableName() string {
|
||||
return "stock"
|
||||
}
|
||||
Reference in new issue
Block a user