<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * options JSON 구조 예시:
     * {
     *   "manufacturer": "포스코",           // 제조사
     *   "inspection_status": "적",         // 수입검사 (적/부적/-)
     *   "inspection_date": "2026-02-05",   // 검사일
     *   "inspection_result": "합격",        // 검사결과
     *   ... 추가 확장 필드
     * }
     */
    public function up(): void
    {
        Schema::table('receivings', function (Blueprint $table) {
            $table->json('options')->nullable()->after('remark')->comment('확장 필드 (제조사, 수입검사 등)');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('receivings', function (Blueprint $table) {
            $table->dropColumn('options');
        });
    }
};
