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
	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"`
	Documents     []Document                  `gorm:"foreignKey:DocumentableId;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
}
