parfum/database/migrations/2025_09_13_045752_create_outlets_table.php
Yoga Pangestu 52e0758419 fix(outlet): menghapus clearable di input
-memisahkan opening_hours dan facilities ke masing masing tabel
-membuat tabel opeing hours dan facilities
-menyesuaikan pemisahakan kolom tersebut menjadi tabel
2025-09-29 11:50:03 +07:00

39 lines
1.1 KiB
PHP

<?php
use App\Enums\OutletStatus;
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('outlets', function (Blueprint $table) {
$table->id();
$table->string('name', 100);
$table->string('slug', 120);
$table->string('phone_number', 20);
$table->text('address');
$table->string('landmark', 20);
$table->text('maps_url')->nullable();
$table->enum('status', [OutletStatus::values()])->default(OutletStatus::OPERATIONAL)->comment(OutletStatus::comment());
$table->date('opened_date');
$table->date('closed_date')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('outlets');
}
};