feat: 5130 레거시 마이그레이션 커맨드 및 관련 파일 추가
- Migrate5130Bom: 완제품 BOM 템플릿 마이그레이션 (61건) - Migrate5130Orders: 주문 데이터 마이그레이션 - Migrate5130PriceItems: 품목 데이터 마이그레이션 - Verify5130Calculation: 견적 계산 검증 커맨드 - Legacy5130Calculator: 레거시 계산 헬퍼 - ContractFromBiddingRequest: 입찰→계약 전환 요청 - 마이그레이션: shipments.work_order_id, order_id_mappings 테이블
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Construction;
|
||||
|
||||
use App\Models\Construction\Contract;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ContractFromBiddingRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// 기본 정보 (입찰에서 가져오므로 optional)
|
||||
'project_name' => 'nullable|string|max:255',
|
||||
|
||||
// 거래처 정보 (입찰에서 가져오므로 optional)
|
||||
'partner_id' => 'nullable|integer',
|
||||
'partner_name' => 'nullable|string|max:255',
|
||||
|
||||
// 담당자 정보
|
||||
'contract_manager_id' => 'nullable|integer',
|
||||
'contract_manager_name' => 'nullable|string|max:100',
|
||||
'construction_pm_id' => 'nullable|integer',
|
||||
'construction_pm_name' => 'nullable|string|max:100',
|
||||
|
||||
// 계약 상세 (입찰에서 가져오므로 optional)
|
||||
'total_locations' => 'nullable|integer|min:0',
|
||||
'contract_amount' => 'nullable|numeric|min:0',
|
||||
'contract_start_date' => 'nullable|date',
|
||||
'contract_end_date' => 'nullable|date|after_or_equal:contract_start_date',
|
||||
|
||||
// 상태 정보
|
||||
'status' => [
|
||||
'nullable',
|
||||
Rule::in([Contract::STATUS_PENDING, Contract::STATUS_COMPLETED]),
|
||||
],
|
||||
'stage' => [
|
||||
'nullable',
|
||||
Rule::in([
|
||||
Contract::STAGE_ESTIMATE_SELECTED,
|
||||
Contract::STAGE_ESTIMATE_PROGRESS,
|
||||
Contract::STAGE_DELIVERY,
|
||||
Contract::STAGE_INSTALLATION,
|
||||
Contract::STAGE_INSPECTION,
|
||||
Contract::STAGE_OTHER,
|
||||
]),
|
||||
],
|
||||
|
||||
// 기타
|
||||
'remarks' => 'nullable|string',
|
||||
'is_active' => 'nullable|boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'contract_end_date.after_or_equal' => __('validation.after_or_equal', ['attribute' => '계약종료일', 'date' => '계약시작일']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user