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:
@@ -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 = [
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user