<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('profit_centers', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('hooreycaId');
            $table->string('nameId')->nullable(); // betu azonosito
            $table->string('email')->nullable();
            $table->string('postCode')->nullable();
            $table->string('city')->nullable();
            $table->string('street')->nullable();
            $table->string('phone')->nullable();
            $table->string('mobil')->nullable();
            $table->string('addressEqual')->default(true); // szallitasi cim azonos
            $table->string('multiAddress')->default(false); // tobb szallitasi cim
            $table->string('note')->nullable(); // megjegyezes

            $table->boolean('canSee')->default(true);
            $table->enum('status', DbStatusFieldEnum::getValues())->default(DbStatusFieldEnum::draft);
            $table->timestamps();
            $table->softDeletes();
            $table->userIdFields();
        });
        /* Artisan::call('db:seed', [
             '--class' => 'ProfitCenterSeeder',
         ]);*/
    }

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