feat(API): 견적-주문 연동 필드 및 마이그레이션 추가

- Order, OrderItem 모델에 견적 연동 필드 추가
- Quote 모델에 order_id 관계 추가
- QuoteService 개선
- 관련 마이그레이션 파일 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-05 15:56:46 +09:00
parent 02e268e49a
commit 1410cf725a
9 changed files with 566 additions and 32 deletions

View File

@@ -5,6 +5,7 @@
use App\Models\Items\Item;
use App\Models\Members\User;
use App\Models\Orders\Client;
use App\Models\Orders\Order;
use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -18,6 +19,7 @@ class Quote extends Model
protected $fillable = [
'tenant_id',
'order_id',
'quote_number',
'registration_date',
'receipt_date',
@@ -142,6 +144,14 @@ public function item(): BelongsTo
return $this->belongsTo(Item::class, 'item_id');
}
/**
* 전환된 수주
*/
public function order(): BelongsTo
{
return $this->belongsTo(Order::class);
}
/**
* 확정자
*/