feat(API): Inspection API 구현

- InspectionController 생성 (CRUD + stats + complete)
- InspectionService 생성 (비즈니스 로직)
- FormRequest 생성 (Store/Update/Complete)
- 라우트 등록 (7개 엔드포인트)
- i18n 메시지 추가 (message.php, error.php)

기존 inspections 테이블 및 Inspection 모델 활용

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-14 17:08:59 +09:00
parent 85542293df
commit a08e155b26
8 changed files with 622 additions and 0 deletions

View File

@@ -44,6 +44,7 @@
use App\Http\Controllers\Api\V1\ExpectedExpenseController;
use App\Http\Controllers\Api\V1\FileStorageController;
use App\Http\Controllers\Api\V1\FolderController;
use App\Http\Controllers\Api\V1\InspectionController;
use App\Http\Controllers\Api\V1\InternalController;
use App\Http\Controllers\Api\V1\ItemMaster\CustomTabController;
use App\Http\Controllers\Api\V1\ItemMaster\EntityRelationshipController;
@@ -1203,6 +1204,17 @@
Route::patch('/{id}/packaging', [WorkResultController::class, 'togglePackaging'])->whereNumber('id')->name('v1.work-results.packaging'); // 포장 상태 토글
});
// 검사 관리 API (Quality)
Route::prefix('inspections')->group(function () {
Route::get('', [InspectionController::class, 'index'])->name('v1.inspections.index'); // 목록
Route::get('/stats', [InspectionController::class, 'stats'])->name('v1.inspections.stats'); // 통계
Route::post('', [InspectionController::class, 'store'])->name('v1.inspections.store'); // 생성
Route::get('/{id}', [InspectionController::class, 'show'])->whereNumber('id')->name('v1.inspections.show'); // 상세
Route::put('/{id}', [InspectionController::class, 'update'])->whereNumber('id')->name('v1.inspections.update'); // 수정
Route::delete('/{id}', [InspectionController::class, 'destroy'])->whereNumber('id')->name('v1.inspections.destroy'); // 삭제
Route::patch('/{id}/complete', [InspectionController::class, 'complete'])->whereNumber('id')->name('v1.inspections.complete'); // 완료 처리
});
// 파일 저장소 API
Route::prefix('files')->group(function () {
Route::post('/upload', [FileStorageController::class, 'upload'])->name('v1.files.upload'); // 파일 업로드 (임시)