<?php

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

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->string('discription');
            $table->string('slug')->unique()->nullable();
            $table->string('price');
            $table->string('sale_price')->nullable();
            $table->string('creator_id');
            $table->string('type')->default("0");
            $table->string('sku')->nullable();
            $table->string('status')->default("0");
            // $table->enum('status', ['0', '1'])->default("0");

            $table->timestamps();
            $table->softDeletes();
        });
    }

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