mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-25 07:45:44 +00:00
(BE-58,,59): extend db schema & build stock transfer api
- Extend DB schema for stock transfers - Build stock transfer API (create,)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user