changes name response transfer

This commit is contained in:
ragilap
2026-03-16 10:41:43 +07:00
parent b2e70fa6eb
commit d0f3392738
@@ -12,11 +12,12 @@ import (
// === DTO Structs === // === DTO Structs ===
type ProductWarehouseRelationDTO struct { type ProductWarehouseRelationDTO struct {
Id uint `json:"id"` Id uint `json:"id"`
ProductId uint `json:"product_id"` ProductId uint `json:"product_id"`
WarehouseId uint `json:"warehouse_id"` WarehouseId uint `json:"warehouse_id"`
Quantity float64 `json:"quantity"` Quantity float64 `json:"quantity"`
AvailableQty *float64 `json:"available_qty,omitempty"` AvailableQty *float64 `json:"available_qty,omitempty"`
TransferAvailableQty *float64 `json:"transfer_available_qty,omitempty"`
} }
type ProductWarehouseListDTO struct { type ProductWarehouseListDTO struct {
@@ -62,11 +63,12 @@ type ProjectFlockRelationDTO struct {
func ToProductWarehouseRelationDTO(e entity.ProductWarehouse) ProductWarehouseRelationDTO { func ToProductWarehouseRelationDTO(e entity.ProductWarehouse) ProductWarehouseRelationDTO {
return ProductWarehouseRelationDTO{ return ProductWarehouseRelationDTO{
Id: e.Id, Id: e.Id,
ProductId: e.ProductId, // Field yang benar dari entity ProductId: e.ProductId, // Field yang benar dari entity
WarehouseId: e.WarehouseId, // Field yang benar dari entity WarehouseId: e.WarehouseId, // Field yang benar dari entity
Quantity: e.Quantity, Quantity: e.Quantity,
AvailableQty: e.AvailableQty, AvailableQty: e.AvailableQty,
TransferAvailableQty: e.AvailableQty,
} }
} }