feat: implement proposal management system including database schema, Filament resources, and client-facing preview views

This commit is contained in:
Ümit Tunç
2026-05-25 07:05:57 +03:00
parent 15ba98e14d
commit c5a33f4d18
14 changed files with 2226 additions and 0 deletions
@@ -0,0 +1,44 @@
<?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('proposals', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->unique();
$table->string('slug')->unique();
$table->string('title');
$table->string('client_name');
$table->string('client_email')->nullable();
$table->longText('content');
$table->decimal('total_price', 15, 2)->nullable();
$table->string('currency', 10)->default('TRY');
$table->string('status', 30)->default('draft'); // draft, sent, accepted, rejected, revised
$table->date('valid_until')->nullable();
$table->text('client_feedback')->nullable();
$table->string('accepted_name')->nullable();
$table->timestamp('accepted_at')->nullable();
$table->integer('views_count')->default(0);
$table->json('meta')->nullable(); // For accent color, logos, etc.
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('proposals');
}
};