33 lines
948 B
PHP
33 lines
948 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('meja', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('nomor_meja')->unique();
|
|
$table->integer('kapasitas');
|
|
$table->enum('status', ['tersedia', 'dipesan', 'terisi'])->default('tersedia');
|
|
$table->enum('kategori', ['outdoor', 'vip-outdoor', 'vip-indoor'])->default('outdoor');
|
|
$table->text('deskripsi')->nullable();
|
|
$table->string('gambar')->nullable(); // Kolom untuk menyimpan path gambar
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('meja');
|
|
}
|
|
}; |