File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
docs/dev-notes/2025-09-23/contest-task-pair-mapping Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ export async function updateContestTaskPair(
148148
149149- DRY原則に従い ` getContestTaskPair() ` を共通メソッドとして切り出し
150150- 複合ユニーク制約 ` @@unique([contestId, taskId]) ` を活用
151- - 重複チェック・存在確認を事前に実施し、適切なログ出力
151+ - Prisma のエラーハンドリング(例: ` P2002 ` , ` P2025 ` )を活用して、事前チェックを省略し、TOCTOU (Time-of-Check to Time-of-Use)競合を回避
152152- Prisma の自動生成型を使用して型安全性を確保
153153
154154## 3. 型定義の更新
@@ -202,13 +202,13 @@ type TaskResultMapByContestTaskPair = Map<ContestTaskPairKey, TaskResult>;
202202
203203- [ ✅] Prisma スキーマに ContestTaskPair モデル追加
204204- [ ✅] マイグレーション実行
205- - [ ✅] CURD メソッドを追加
205+ - [ ✅] CRUD メソッドを追加
206206- [ ✅] TypeScript 型定義追加
207207
208208## 決定事項
209209
2102101 . ** モデル名** : ContestTaskPair
211- 2 . ** 型名** : ContestTaskPairKey, TaskResultByContestTaskPair
211+ 2 . ** 型名** : ContestTaskPairKey, TaskResultMapByContestTaskPair
212212
213213## 今後の課題
214214
You can’t perform that action at this time.
0 commit comments