refac: 변경한 DTO에 따라 코드 수정

- Spatie/DataTransferObject 대비
  - MapFrom,MapTo -> RawName
  - Strict -> 항상
     - 심지어 raw type도 더 까다롭게
  - array에 MapConverter 적용
  - NullIsUndefined 적용
  - 빈 nullable arg자리에 null 강제 지정
- Vue3에 v-model.number 지정
  - input type="number" 기준
This commit is contained in:
2022-05-22 22:39:28 +09:00
parent 43a5162a15
commit 78a55fb87a
24 changed files with 152 additions and 128 deletions
+9 -8
View File
@@ -43,7 +43,7 @@ class Betting
if ($rawBettingInfo === null) {
throw new \RuntimeException("해당 베팅이 없습니다: {$bettingID}");
}
$this->info = new BettingInfo($rawBettingInfo);
$this->info = BettingInfo::fromArray($rawBettingInfo);
}
private function _convertBettingKey(array $bettingType): string
@@ -148,13 +148,14 @@ class Betting
}
}
$bettingItem = new BettingItem([
'betting_id' => $this->bettingID,
'general_id' => $generalID,
'user_id' => $userID,
'betting_type' => $bettingTypeKey,
'amount' => $amount
]);
$bettingItem = new BettingItem(
rowID: null,
bettingID: $this->bettingID,
generalID: $generalID,
userID: $userID,
bettingType: $bettingTypeKey,
amount: $amount
);
$db->insertUpdate(
'ng_betting',