feat(BE): add product flags to product warehouse response

This commit is contained in:
aguhh18
2025-10-16 12:51:41 +07:00
parent f6f62246c6
commit 9f26d5c784
2 changed files with 15 additions and 8 deletions
@@ -34,7 +34,7 @@ func NewProductWarehouseService(repo repository.ProductWarehouseRepository, vali
}
func (s productWarehouseService) withRelations(db *gorm.DB) *gorm.DB {
return db.Preload("Product").Preload("Warehouse").Preload("CreatedUser")
return db.Preload("Product.Flags").Preload("Product").Preload("Warehouse").Preload("CreatedUser")
}
func (s productWarehouseService) GetAll(c *fiber.Ctx, params *validation.Query) ([]entity.ProductWarehouse, int64, error) {