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'); + }); + } +};