<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('permissions', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name');
            $table->string('guard_name');
            $table->string('name_fa')->nullable();
            $table->text('description')->nullable();
            $table->timestamps();
            $table->text('back_end_implementation_document')->nullable();
            $table->text('fron_end_implementation_document')->nullable();
            $table->string('type', 100)->nullable();
            $table->string('type_fa', 119)->nullable();
            $table->boolean('need_province')->nullable();
            $table->boolean('need_edare_shahri')->nullable();
        });
    }

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