<?php

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

class CreatePlansTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('plans', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->double('cost')->default('0');
            $table->enum('recurring_type',['onetime','monthly','weekly','yearly']);
            $table->integer('table_limit')->default(0);
            $table->integer('restaurant_limit')->default(0);
            $table->integer('item_limit')->default(0);
            $table->enum('status',['active','inactive'])->default('active');
            $table->enum('item_unlimited',['yes','no'])->default('no');
            $table->enum('restaurant_unlimited',['yes','no'])->default('no');
            $table->enum('table_unlimited',['yes','no'])->default('no');
            $table->timestamps();
        });
    }

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