feat: Phase 6.1 악성채권 추심관리 API 구현

- 테이블 3개: bad_debts, bad_debt_documents, bad_debt_memos
- 모델 3개: BadDebt, BadDebtDocument, BadDebtMemo
- BadDebtService: CRUD, 요약 통계, 서류/메모 관리
- API 엔드포인트 11개 (목록, 등록, 상세, 수정, 삭제, 토글, 서류/메모 CRUD)
- Swagger 문서 작성 완료
This commit is contained in:
2025-12-19 15:57:04 +09:00
parent 3020026abf
commit c0af888bed
15 changed files with 1498 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Http\Requests\V1\BadDebt;
use App\Models\BadDebts\BadDebtDocument;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreBadDebtDocumentRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'document_type' => ['required', 'string', Rule::in(array_keys(BadDebtDocument::DOCUMENT_TYPES))],
'file_id' => ['required', 'integer', 'exists:files,id'],
];
}
/**
* Get custom messages for validator errors.
*
* @return array<string, string>
*/
public function messages(): array
{
return [
'document_type.required' => __('validation.required', ['attribute' => '서류유형']),
'document_type.in' => __('validation.in', ['attribute' => '서류유형']),
'file_id.required' => __('validation.required', ['attribute' => '파일']),
'file_id.exists' => __('validation.exists', ['attribute' => '파일']),
];
}
}