mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
9b016dc30a
- Extend DB schema for stock transfers - Build stock transfer API (create,)
22 lines
725 B
Go
22 lines
725 B
Go
package entities
|
|
|
|
import "time"
|
|
|
|
|
|
// DETAIL PRODUK
|
|
type StockTransferDetail struct {
|
|
Id uint64 `gorm:"primaryKey;autoIncrement"`
|
|
StockTransferId uint64
|
|
ProductId uint64
|
|
Quantity float64
|
|
BeforeQuantity float64
|
|
AfterQuantity float64
|
|
Note string
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
DeletedAt *time.Time `gorm:"index"`
|
|
// Relations
|
|
StockTransfer *StockTransfer `gorm:"foreignKey:StockTransferId"`
|
|
Product *Product `gorm:"foreignKey:ProductId"`
|
|
DeliveryItems []StockTransferDeliveryItem `gorm:"foreignKey:StockTransferDetailId"`
|
|
} |