<?php

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

class CreateExportsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('exports', function (Blueprint $table) {
            $table->id();
            $table->foreignId('group_id')->nullable()->constrained()->onDelete('cascade');
            $table->foreignId('category_id')->nullable()->constrained()->onDelete('cascade');
            $table->text('title');
            $table->string('country')->nullable();
            $table->string('unit')->nullable();
            $table->string('amount')->nullable();
            $table->string('point')->nullable();
            $table->string('place')->nullable();
            $table->string('currency')->nullable();
            $table->string('payment')->nullable();
            $table->string('send')->nullable();
            $table->string('seller')->nullable();
            $table->string('price')->nullable();
            $table->boolean('is_line')->default(false);
            $table->timestamps();
        });
    }

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