<?php

use App\Database\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('profit_center_supplier', function (Blueprint $table) {
            $table->id();
            $table->foreignId('profit_center_id')->constrained()->onDelete('NO ACTION');
            $table->foreignId('supplier_id')->constrained()->onDelete('NO ACTION');
            $table->json('excludeProductGroupId')->nullable();
            $table->timestamps();
            $table->userIdFields();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('profit_center_supplier');
    }
};
