資源評価結果取得サービス
複数の水産資源に対する評価結果をリポジトリから取得する。
評価結果リポジトリ
複数の水産資源の評価結果を取得する
評価結果を取得する水産資源の配列
各資源とその評価結果のペアの配列。評価結果がない場合は undefined
const service = new GetAssessmentResultsService(repository);const results = await service.execute(stocks);for (const { stock, result } of results) { if (result) { console.log(`${stock.name}: ${result.value}`); }} Copy
const service = new GetAssessmentResultsService(repository);const results = await service.execute(stocks);for (const { stock, result } of results) { if (result) { console.log(`${stock.name}: ${result.value}`); }}
資源評価結果取得サービス
複数の水産資源に対する評価結果をリポジトリから取得する。