refactor: BOM 시스템 정리 및 API 구조 최적화

## 주요 변경사항

### BOM 시스템 통합 및 정리
- 기본 BOM 시스템 완전 제거 (미완성 3-tier 구조)
  - app/Http/Controllers/Api/V1/BomController.php 삭제
  - app/Services/BomService.php 삭제
  - app/Models/Products/Bom.php 삭제
  - app/Models/Products/BomItem.php 삭제
- BOM 역할 명확화: Product BOM (운영용) + Design BOM (설계용)
- Tag 모델에서 불필요한 BOM 참조 제거

### API 그룹핑 최적화
- Products & Materials 통합: /v1/products/materials/*
- Settings & Configuration 통합: /v1/settings/*
  - 필드 설정: /v1/settings/fields/*
  - 옵션 관리: /v1/settings/options/*
  - 공통 코드: /v1/settings/common/*
- 기존 분산된 라우트 통합으로 일관성 향상

### 번역 완성도 향상
- 영어 에러 메시지 누락 항목 추가
- Settings, Materials, File 관련 메시지 보완
- 한국어/영어 번역 파일 동기화 완료

### 시스템 품질 개선
- API 구조 논리적 재구성으로 사용자 경험 향상
- 코드 복잡도 감소 및 유지보수성 개선
- 불필요한 컨트롤러/서비스 제거로 시스템 단순화

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-24 20:35:17 +09:00
parent 2d9217c9b4
commit b6ff56023f
12 changed files with 193 additions and 347 deletions

View File

@@ -1,42 +0,0 @@
<?php
namespace App\Models\Products;
use App\Models\Commons\File;
use App\Models\Commons\Tag;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* @mixin IdeHelperBom
*/
class Bom extends Model
{
use SoftDeletes;
protected $fillable = ['tenant_id','product_id','code','name','category_id','attributes','description','is_default','is_active','image_file_id'];
public function product() {
return $this->belongsTo(Product::class);
}
public function category() {
return $this->belongsTo(CommonCode::class, 'category_id');
}
public function items() {
return $this->hasMany(BomItem::class);
}
public function image() {
return $this->belongsTo(File::class, 'image_file_id');
}
// 파일 목록 (N:M, 폴리모픽)
public function files()
{
return $this->morphMany(File::class, 'fileable');
}
// 태그 목록 (N:M, 폴리모픽)
public function tags()
{
return $this->morphToMany(Tag::class, 'taggable');
}
}

View File

@@ -1,25 +0,0 @@
<?php
namespace App\Models\Products;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* @mixin IdeHelperBomItem
*/
class BomItem extends Model
{
use SoftDeletes;
protected $fillable = ['tenant_id','bom_id','parent_id','item_type','ref_id','quantity','attributes','sort_order'];
public function bom() {
return $this->belongsTo(Bom::class);
}
public function parent() {
return $this->belongsTo(self::class, 'parent_id');
}
public function children() {
return $this->hasMany(self::class, 'parent_id');
}
}