feat: 테넌트별 채번 규칙 시스템 구현

- numbering_rules 테이블: JSON 패턴 기반 채번 규칙 저장 (tenant별)
- numbering_sequences 테이블: MySQL UPSERT 기반 atomic 시퀀스 관리
- NumberingService: generate/preview/nextSequence 핵심 서비스
- QuoteNumberService: NumberingService 우선, 폴백 QT{YYYYMMDD}{NNNN}
- OrderService: NumberingService 우선 (pair_code 지원), 폴백 ORD{YYYYMMDD}{NNNN}
- StoreOrderRequest: pair_code 필드 추가
- NumberingRuleSeeder: tenant_id=287 견적(KD-PR)/수주(KD-{pairCode}) 규칙

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 09:50:52 +09:00
parent 6318474b6f
commit 78851ec04a
9 changed files with 475 additions and 44 deletions

View File

@@ -24,6 +24,7 @@ public function rules(): array
Order::STATUS_CONFIRMED,
])],
'category_code' => 'nullable|string|max:50',
'pair_code' => 'nullable|string|max:20',
// 거래처 정보
'client_id' => 'nullable|integer|exists:clients,id',