feat: implement comprehensive project management and client tracking portal with Filament integration
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<?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('projects', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('proposal_id')->nullable()->constrained('proposals')->nullOnDelete();
|
||||
$table->string('title');
|
||||
$table->string('slug')->unique();
|
||||
$table->string('client_name');
|
||||
$table->string('client_email')->nullable();
|
||||
$table->string('client_access_code')->nullable();
|
||||
$table->enum('status', ['planning', 'in_progress', 'on_hold', 'completed', 'cancelled'])->default('in_progress');
|
||||
$table->unsignedInteger('progress_percent')->default(0);
|
||||
$table->date('start_date')->nullable();
|
||||
$table->date('target_date')->nullable();
|
||||
$table->timestamp('completed_at')->nullable();
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
Schema::create('project_modules', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('project_id')->constrained('projects')->cascadeOnDelete();
|
||||
$table->string('title');
|
||||
$table->text('description')->nullable();
|
||||
$table->unsignedInteger('weight_percent')->default(10);
|
||||
$table->enum('status', ['pending', 'in_progress', 'completed'])->default('pending');
|
||||
$table->date('start_date')->nullable();
|
||||
$table->date('end_date')->nullable();
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('project_tasks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('project_id')->constrained('projects')->cascadeOnDelete();
|
||||
$table->foreignId('project_module_id')->nullable()->constrained('project_modules')->nullOnDelete();
|
||||
$table->string('title');
|
||||
$table->text('description')->nullable();
|
||||
$table->enum('status', ['todo', 'in_progress', 'review', 'done'])->default('todo');
|
||||
$table->enum('priority', ['low', 'medium', 'high', 'urgent'])->default('medium');
|
||||
$table->date('due_date')->nullable();
|
||||
$table->string('assigned_person')->nullable();
|
||||
$table->integer('order_index')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('project_updates', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('project_id')->constrained('projects')->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->string('title');
|
||||
$table->text('content');
|
||||
$table->unsignedInteger('progress_percent_at_update')->nullable();
|
||||
$table->boolean('is_public')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('project_updates');
|
||||
Schema::dropIfExists('project_tasks');
|
||||
Schema::dropIfExists('project_modules');
|
||||
Schema::dropIfExists('projects');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user