39 lines
1.2 KiB
PHP
39 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('clients', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('client_name');
|
|
$table->string('client_email');
|
|
$table->string('client_phone')->nullable();
|
|
$table->string('company_name')->nullable();
|
|
$table->string('project_name');
|
|
$table->text('project_details')->nullable();
|
|
$table->foreignId('responsible_user_id')->constrained('users')->onDelete('cascade');
|
|
$table->foreignId('created_by')->constrained('users')->onDelete('cascade');
|
|
$table->json('assigned_team_members')->nullable();
|
|
$table->string('status')->default('active');
|
|
$table->string('latest_sentiment')->default('neutral');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('clients');
|
|
}
|
|
};
|