Files
bogazici-api/database/migrations/2026_03_02_090007_create_leads_table.php
2026-03-27 10:41:54 +03:00

42 lines
1.2 KiB
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('leads', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('phone');
$table->string('target_course')->nullable();
$table->string('education_level')->nullable();
$table->string('subject')->nullable();
$table->text('message')->nullable();
$table->string('status')->default('new');
$table->text('notes')->nullable();
$table->boolean('is_read')->default(false);
$table->string('source');
$table->json('utm')->nullable();
$table->boolean('consent_kvkk')->default(false);
$table->string('consent_text_version')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('leads');
}
};