mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
16 lines
782 B
Go
16 lines
782 B
Go
package entities
|
|
|
|
type ProductWarehouse struct {
|
|
Id uint `gorm:"primaryKey;column:id"`
|
|
ProductId uint `gorm:"column:product_id;not null"`
|
|
WarehouseId uint `gorm:"column:warehouse_id;not null"`
|
|
ProjectFlockKandangId *uint `gorm:"column:project_flock_kandang_id"`
|
|
Quantity float64 `gorm:"column:qty;type:numeric(15,3);default:0"`
|
|
|
|
// Relations
|
|
Product Product `gorm:"foreignKey:ProductId;references:Id"`
|
|
Warehouse Warehouse `gorm:"foreignKey:WarehouseId;references:Id"`
|
|
ProjectFlockKandang *ProjectFlockKandang `gorm:"foreignKey:ProjectFlockKandangId;references:Id"`
|
|
StockLogs []StockLog `gorm:"foreignKey:ProductWarehouseId;references:Id"`
|
|
}
|