From d0f3392738fa7c8f42e7b3b76b9d92e080a822ee Mon Sep 17 00:00:00 2001 From: ragilap Date: Mon, 16 Mar 2026 10:41:43 +0700 Subject: [PATCH] changes name response transfer --- .../dto/product_warehouse.dto.go | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/internal/modules/inventory/product-warehouses/dto/product_warehouse.dto.go b/internal/modules/inventory/product-warehouses/dto/product_warehouse.dto.go index 4953012a..0d367522 100644 --- a/internal/modules/inventory/product-warehouses/dto/product_warehouse.dto.go +++ b/internal/modules/inventory/product-warehouses/dto/product_warehouse.dto.go @@ -12,11 +12,12 @@ import ( // === DTO Structs === type ProductWarehouseRelationDTO struct { - Id uint `json:"id"` - ProductId uint `json:"product_id"` - WarehouseId uint `json:"warehouse_id"` - Quantity float64 `json:"quantity"` - AvailableQty *float64 `json:"available_qty,omitempty"` + Id uint `json:"id"` + ProductId uint `json:"product_id"` + WarehouseId uint `json:"warehouse_id"` + Quantity float64 `json:"quantity"` + AvailableQty *float64 `json:"available_qty,omitempty"` + TransferAvailableQty *float64 `json:"transfer_available_qty,omitempty"` } type ProductWarehouseListDTO struct { @@ -62,11 +63,12 @@ type ProjectFlockRelationDTO struct { func ToProductWarehouseRelationDTO(e entity.ProductWarehouse) ProductWarehouseRelationDTO { return ProductWarehouseRelationDTO{ - Id: e.Id, - ProductId: e.ProductId, // Field yang benar dari entity - WarehouseId: e.WarehouseId, // Field yang benar dari entity - Quantity: e.Quantity, - AvailableQty: e.AvailableQty, + Id: e.Id, + ProductId: e.ProductId, // Field yang benar dari entity + WarehouseId: e.WarehouseId, // Field yang benar dari entity + Quantity: e.Quantity, + AvailableQty: e.AvailableQty, + TransferAvailableQty: e.AvailableQty, } }