feat: 매입유형(purchase_type) 필드 추가

- 마이그레이션: purchases 테이블에 purchase_type 컬럼 추가
- Purchase 모델: $fillable 및 PURCHASE_TYPES 상수 추가
- StorePurchaseRequest: purchase_type validation 추가
- UpdatePurchaseRequest: purchase_type validation 추가
- PurchaseService: store/update에 purchase_type 처리 추가

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-27 16:47:26 +09:00
parent cdec2519d9
commit 71a33d79cc
5 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('purchases', function (Blueprint $table) {
$table->string('purchase_type', 50)->nullable()->after('status')->comment('매입유형');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('purchases', function (Blueprint $table) {
$table->dropColumn('purchase_type');
});
}
};