Files
lti-api/internal/entities/recording_stock.go
T
2026-06-09 09:44:55 +07:00

27 lines
903 B
Go

package entities
type RecordingStock struct {
Id uint `gorm:"primaryKey"`
RecordingId uint `gorm:"column:recording_id;not null;index"`
ProductWarehouseId uint `gorm:"column:product_warehouse_id;not null"`
ProjectFlockKandangId *uint `gorm:"column:project_flock_kandang_id;index"`
UsageQty *float64 `gorm:"column:usage_qty"`
PendingQty *float64 `gorm:"column:pending_qty"`
TotalPrice float64 `gorm:"-"`
Allocations []RecordingStockAlloc `gorm:"-"`
Recording Recording `gorm:"foreignKey:RecordingId;references:Id"`
ProductWarehouse ProductWarehouse `gorm:"foreignKey:ProductWarehouseId;references:Id"`
}
type RecordingStockAlloc struct {
SourceType string
SourceId uint
PrNumber string
PoNumber string
AdjNumber string
Qty float64
UnitPrice float64
Subtotal float64
}