21/02/02 22:08:39.45 mk8gJgM8.net
>>109
毎回DB読まなくてもいいようにマスタデータをメモリ上にロードしてるのかもしれない
const makeCloth = function(repository) {
const clothPrice = repository.load(…)
return {
getPrice(id) {
const price = clothPrice.find(id)
return price
}
}
}
const Cloth = makeCloth(repository)
Cloth.getPrice(id)