- Design BOM 템플릿 diff/clone 엔드포인트 추가 - 컨트롤러 검증 로직 FormRequest 분리(DiffRequest/CloneRequest/Upsert/ReplaceItems) - BomTemplateService에 diffTemplates/cloneTemplate/replaceItems/쇼우 로직 정리 - ModelVersionController createDraft FormRequest 적용 및 서비스 호출 정리 - 모델버전 release 전 유효성 검사(존재/활성/테넌트 일치, qty>0, 중복 금지) 추가 - DB enum 미사용 방침 준수(status 문자열 유지) - model_versions 인덱스 최적화(tenant_id, model_id, status / 기간 범위) - Swagger 문서(Design BOM) 및 i18n 메시지 키 추가
30 lines
771 B
PHP
30 lines
771 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Design\BomTemplate;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class DiffRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'other_template_id' => 'required|integer|min:1',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'other_template_id.required' => __('validation.required', ['attribute' => 'other_template_id']),
|
|
'other_template_id.integer' => __('validation.integer', ['attribute' => 'other_template_id']),
|
|
'other_template_id.min' => __('validation.min.numeric', ['attribute' => 'other_template_id', 'min' => 1]),
|
|
];
|
|
}
|
|
}
|