From edb81a104123ddfe45167e0bfb0ef360ec010e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Thu, 19 Feb 2026 23:46:22 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20work=5Forders=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=EC=97=90=20options=20JSON=20=EC=BB=AC=EB=9F=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 마이그레이션: work_orders.options JSON nullable 컬럼 추가 - WorkOrder 모델: $fillable, $casts에 options 추가 - bending_info 등 작업지시 레벨 추가 옵션 저장용 Co-Authored-By: Claude Opus 4.6 --- app/Models/Production/WorkOrder.php | 2 ++ ...00000_add_options_to_work_orders_table.php | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 database/migrations/2026_02_19_200000_add_options_to_work_orders_table.php diff --git a/app/Models/Production/WorkOrder.php b/app/Models/Production/WorkOrder.php index 8d31f86..2ca6480 100644 --- a/app/Models/Production/WorkOrder.php +++ b/app/Models/Production/WorkOrder.php @@ -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 = [ diff --git a/database/migrations/2026_02_19_200000_add_options_to_work_orders_table.php b/database/migrations/2026_02_19_200000_add_options_to_work_orders_table.php new file mode 100644 index 0000000..b647168 --- /dev/null +++ b/database/migrations/2026_02_19_200000_add_options_to_work_orders_table.php @@ -0,0 +1,23 @@ +json('options')->nullable()->after('memo') + ->comment('작업지시 추가 옵션 (bending_info 등)'); + }); + } + + public function down(): void + { + Schema::table('work_orders', function (Blueprint $table) { + $table->dropColumn('options'); + }); + } +};