feat: [items] 품목 생성/조회 개선
- 중복 코드 자동 증가 기능 추가 (P-001 → P-002, ABC → ABC-001)
- soft delete 항목 조회 파라미터 추가 (include_deleted)
- ValidationException 응답 포맷 수정 (공통 에러 형식)
- batch delete 라우트 순서 수정 (/{id} 보다 /batch 먼저)
- is_active 기본값 true 설정
This commit is contained in:
@@ -14,7 +14,7 @@ public function authorize(): bool
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// 필수 필드
|
||||
// 필수 필드 (중복 시 Service에서 자동 증가 처리)
|
||||
'code' => 'required|string|max:50',
|
||||
'name' => 'required|string|max:255',
|
||||
'product_type' => 'required|string|in:FG,PT,SM,RM,CS',
|
||||
@@ -46,6 +46,7 @@ public function messages(): array
|
||||
return [
|
||||
'code.required' => '품목코드는 필수입니다.',
|
||||
'code.max' => '품목코드는 50자 이내로 입력하세요.',
|
||||
'code.unique' => '이미 사용 중인 품목코드입니다.',
|
||||
'name.required' => '품목명은 필수입니다.',
|
||||
'name.max' => '품목명은 255자 이내로 입력하세요.',
|
||||
'product_type.required' => '품목 유형은 필수입니다.',
|
||||
|
||||
Reference in New Issue
Block a user