feat: 품목 파일 업로드 API 구현 (절곡도, 시방서, 인정서)

- Products 테이블에 9개 파일 관련 필드 추가
  - bending_diagram, bending_details (JSON)
  - specification_file, specification_file_name
  - certification_file, certification_file_name
  - certification_number, certification_start_date, certification_end_date

- ItemsFileController 구현 (Code-based API)
  - POST /items/{code}/files - 파일 업로드
  - DELETE /items/{code}/files/{type} - 파일 삭제
  - 파일 타입: bending_diagram, specification, certification

- ItemsFileUploadRequest 검증
  - 파일 타입별 MIME 검증 (이미지/문서)
  - 파일 크기 제한 (10MB/20MB)
  - 인증 정보 및 절곡 상세 정보 검증

- Swagger 문서 작성 (ItemsFileApi.php)
  - 업로드/삭제 API 스펙
  - 스키마: ItemFileUploadResponse, ItemFileDeleteResponse
This commit is contained in:
2025-11-17 13:40:07 +09:00
parent 2f2fffb6f0
commit 4749761519
10 changed files with 609 additions and 3 deletions

View File

@@ -23,12 +23,20 @@ class Product extends Model
'safety_stock', 'lead_time', 'is_variable_size',
'product_category', 'part_type',
'attributes_archive',
// 파일 필드
'bending_diagram', 'bending_details',
'specification_file', 'specification_file_name',
'certification_file', 'certification_file_name',
'certification_number', 'certification_start_date', 'certification_end_date',
'created_by', 'updated_by',
];
protected $casts = [
'attributes' => 'array',
'attributes_archive' => 'array',
'bending_details' => 'array',
'certification_start_date' => 'date',
'certification_end_date' => 'date',
'is_sellable' => 'boolean',
'is_purchasable' => 'boolean',
'is_producible' => 'boolean',