<?php

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

class CreateLaundryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('laundry', function (Blueprint $table) {
            $table->id();
            $table->foreignId('brand_id')->constrained('brand')->onDelete('cascade');
            $table->string('nama_laundry');
            $table->string('alamat');
            $table->string('no_telp');
            $table->string('email');
            $table->enum('status', ['trial', 'pro'])->default('trial');
            $table->date('tgl_daftar');
            $table->date('tgl_pro')->nullable();
            $table->timestamps();
        });
    }

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