38 lines
1.4 KiB
PHP
38 lines
1.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('offers', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->uuid('uuid')->unique();
|
|
$table->string('title');
|
|
$table->string('slug')->unique();
|
|
$table->enum('category', ['restaurant', 'experience', 'activity', 'product', 'service']);
|
|
$table->string('excerpt')->nullable();
|
|
$table->text('description')->nullable();
|
|
$table->string('location_label')->nullable();
|
|
$table->decimal('lat', 10, 7)->nullable();
|
|
$table->decimal('lng', 10, 7)->nullable();
|
|
$table->decimal('price_from', 10, 2)->nullable();
|
|
$table->unsignedInteger('duration_minutes')->nullable();
|
|
$table->string('image_url')->nullable();
|
|
$table->enum('status', ['draft', 'published', 'paused'])->default('draft');
|
|
$table->boolean('is_featured')->default(false);
|
|
$table->integer('priority_score')->default(0);
|
|
$table->boolean('available_now')->default(true);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('offers');
|
|
}
|
|
};
|