feat: 입찰(Bidding) 관리 기능 구현
- Bidding 모델, 서비스, 컨트롤러, FormRequest 추가 - 마이그레이션 및 시더 추가 - Swagger API 문서 추가 - 견적에서 입찰 전환 시 중복 체크 로직 추가 - per_page 파라미터 100 초과 시 자동 클램핑 처리 - error.bidding.already_registered 에러 메시지 추가
This commit is contained in:
46
app/Http/Requests/Bidding/BiddingUpdateRequest.php
Normal file
46
app/Http/Requests/Bidding/BiddingUpdateRequest.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Bidding;
|
||||
|
||||
use App\Models\Bidding\Bidding;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class BiddingUpdateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// 거래처/현장
|
||||
'client_id' => ['nullable', 'integer'],
|
||||
'client_name' => ['nullable', 'string', 'max:100'],
|
||||
'project_name' => ['nullable', 'string', 'max:200'],
|
||||
// 입찰 정보
|
||||
'bidding_date' => ['nullable', 'date'],
|
||||
'bid_date' => ['nullable', 'date'],
|
||||
'submission_date' => ['nullable', 'date'],
|
||||
'confirm_date' => ['nullable', 'date'],
|
||||
'total_count' => ['nullable', 'integer', 'min:0'],
|
||||
'bidding_amount' => ['nullable', 'numeric', 'min:0'],
|
||||
// 상태
|
||||
'status' => ['nullable', 'string', Rule::in(Bidding::STATUSES)],
|
||||
// 입찰자
|
||||
'bidder_id' => ['nullable', 'integer'],
|
||||
'bidder_name' => ['nullable', 'string', 'max:50'],
|
||||
// 공사기간
|
||||
'construction_start_date' => ['nullable', 'date'],
|
||||
'construction_end_date' => ['nullable', 'date', 'after_or_equal:construction_start_date'],
|
||||
'vat_type' => ['nullable', 'string', Rule::in(Bidding::VAT_TYPES)],
|
||||
// 비고
|
||||
'remarks' => ['nullable', 'string'],
|
||||
// 견적 데이터 스냅샷
|
||||
'expense_items' => ['nullable', 'array'],
|
||||
'estimate_detail_items' => ['nullable', 'array'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user