Private
Public Access
14 lines
409 B
Go
14 lines
409 B
Go
package models
|
|
|
|
type Stock struct {
|
|
ID uint64 `gorm:"primaryKey" json:"id"`
|
|
RepuestoID uint64 `gorm:"index;not null" json:"repuestoId"`
|
|
CajonID string `gorm:"type:varchar(30);index;not null" json:"cajonId"`
|
|
Cantidad uint `gorm:"not null;default:0" json:"cantidad"`
|
|
Repuesto Repuesto `gorm:"foreignKey:RepuestoID" json:"repuesto"`
|
|
}
|
|
|
|
func (Stock) TableName() string {
|
|
return "stock"
|
|
}
|