Initial commit - Physiotherapy Clinic Management System

This commit is contained in:
Deploy committed 2026-03-10 00:38:51 +03:00
commit dbb326f2cc
300 files changed
+144285

No files matched your search

@@ -0,0 +1,36 @@
<?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('treatments', function (Blueprint $table) {
$table->id();
$table->foreignId('patient_id')->constrained('patients');
$table->foreignId('appointment_id')->nullable()->constrained('appointments');
$table->foreignId('user_id')->constrained('users'); // therapist
$table->string('treatment_code')->unique();
$table->string('name');
$table->text('description')->nullable();
$table->integer('sessions_count')->default(1);
$table->integer('sessions_completed')->default(0);
$table->date('start_date');
$table->date('end_date')->nullable();
$table->enum('status', ['planned', 'in_progress', 'completed', 'cancelled'])->default('planned');
$table->decimal('total_cost', 15, 2)->default(0);
$table->foreignId('currency_id')->constrained('currencies');
$table->text('notes')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('treatments');
}
};