feat: item_fields 테이블에 is_active 컬럼 추가

- 마이그레이션: is_active 컬럼 추가 (기본값 true)
- ItemField 모델: fillable, casts에 is_active 추가
- ItemFieldService: store, storeIndependent, clone, update 메서드에 is_active 처리
- FormRequest: is_active 유효성 검사 규칙 추가
- API Flow 테스트 시나리오 추가 (docs/api-flows/)
- docs/INDEX.md에 api-flows 섹션 추가

ModelTrait::scopeActive() 메서드 사용을 위한 필수 컬럼
This commit is contained in:
2025-12-05 14:40:09 +09:00
parent c946fa457c
commit 5131bfff98
7 changed files with 232 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* item_fields 테이블에 is_active 컬럼 추가
*
* 목적: ModelTrait의 scopeActive() 메서드 사용을 위한 활성화 상태 컬럼
*
* 변경 내용:
* - is_active: 필드 활성화 여부 (기본값: true)
*
* 참고:
* - ModelTrait::scopeActive()는 is_active = 1 조건으로 필터링
* - 기존 레코드는 모두 활성 상태(1)로 설정
*/
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('item_fields', function (Blueprint $table) {
$table->boolean('is_active')
->default(true)
->after('is_common')
->comment('활성화 여부 (ModelTrait::scopeActive() 사용)');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('item_fields', function (Blueprint $table) {
$table->dropColumn('is_active');
});
}
};