feat: work_orders 테이블에 options JSON 컬럼 추가

- 마이그레이션: work_orders.options JSON nullable 컬럼 추가
- WorkOrder 모델: $fillable, $casts에 options 추가
- bending_info 등 작업지시 레벨 추가 옵션 저장용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 23:46:22 +09:00
parent 6ae82b7057
commit edb81a1041
2 changed files with 25 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ class WorkOrder extends Model
'completed_at',
'shipped_at',
'memo',
'options',
'is_active',
'created_by',
'updated_by',
@@ -55,6 +56,7 @@ class WorkOrder extends Model
'completed_at' => 'datetime',
'shipped_at' => 'datetime',
'is_active' => 'boolean',
'options' => 'json',
];
protected $hidden = [

View File

@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('work_orders', function (Blueprint $table) {
$table->json('options')->nullable()->after('memo')
->comment('작업지시 추가 옵션 (bending_info 등)');
});
}
public function down(): void
{
Schema::table('work_orders', function (Blueprint $table) {
$table->dropColumn('options');
});
}
};