feat: [vehicle] 법인차량 사진 API 추가

- CorporateVehicle 모델 (photos 관계 포함)
- VehiclePhotoService (R2 저장, 최대 10장 제한)
- VehiclePhotoController (index/store/destroy)
- StoreVehiclePhotoRequest (동적 max 검증)
- finance.php 라우트 등록
This commit is contained in:
김보곤
2026-03-12 22:26:39 +09:00
parent aeffd5be61
commit 85d5b98966
5 changed files with 263 additions and 0 deletions

View File

@@ -42,6 +42,7 @@
use App\Http\Controllers\Api\V1\TaxInvoiceController;
use App\Http\Controllers\Api\V1\TodayIssueController;
use App\Http\Controllers\Api\V1\VatController;
use App\Http\Controllers\Api\V1\VehiclePhotoController;
use App\Http\Controllers\Api\V1\VendorLedgerController;
use App\Http\Controllers\Api\V1\WelfareController;
use App\Http\Controllers\Api\V1\WithdrawalController;
@@ -396,6 +397,13 @@
Route::delete('/{id}', [AccountSubjectController::class, 'destroy'])->whereNumber('id')->name('v1.account-subjects.destroy');
});
// Corporate Vehicle Photo API (법인차량 사진)
Route::prefix('corporate-vehicles')->group(function () {
Route::get('/{id}/photos', [VehiclePhotoController::class, 'index'])->whereNumber('id')->name('v1.corporate-vehicles.photos.index');
Route::post('/{id}/photos', [VehiclePhotoController::class, 'store'])->whereNumber('id')->name('v1.corporate-vehicles.photos.store');
Route::delete('/{id}/photos/{fileId}', [VehiclePhotoController::class, 'destroy'])->whereNumber(['id', 'fileId'])->name('v1.corporate-vehicles.photos.destroy');
});
// Bill API (어음관리)
Route::prefix('bills')->group(function () {
Route::get('', [BillController::class, 'index'])->name('v1.bills.index');