(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:
aguhh18
2025-10-14 22:16:50 +07:00
parent 5283aed996
commit 9b016dc30a
25 changed files with 897 additions and 0 deletions
@@ -0,0 +1,24 @@
package entities
import "time"
// DETAIL EKSPEDISI
type StockTransferDelivery struct {
Id uint64 `gorm:"primaryKey;autoIncrement"`
StockTransferId uint64
SupplierId uint64
VehiclePlate string
DriverName string
DocumentNumber string
DocumentPath string
ShippingCostItem float64
ShippingCostTotal float64
Note string
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `gorm:"index"`
// Relations
StockTransfer *StockTransfer `gorm:"foreignKey:StockTransferId"`
Supplier *Supplier `gorm:"foreignKey:SupplierId"`
Items []StockTransferDeliveryItem `gorm:"foreignKey:StockTransferDeliveryId"`
}