From 53da38c6f54e868c14f0774eca9e086d857edde2 Mon Sep 17 00:00:00 2001 From: Masroor Ehsan Date: Wed, 8 Jan 2025 20:16:41 +0600 Subject: [PATCH] minor --- app/Models/StudyReport.php | 2 +- .../2024_12_28_051451_create_study_reports_table.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/StudyReport.php b/app/Models/StudyReport.php index 1d4cf9f..8ec6460 100644 --- a/app/Models/StudyReport.php +++ b/app/Models/StudyReport.php @@ -17,7 +17,7 @@ public function study(): BelongsTo public function radiologist(): BelongsTo { - return $this->belongsTo(User::class, 'radiologist_id'); + return $this->belongsTo(User::class, 'read_by_id'); } /** diff --git a/database/migrations/2024_12_28_051451_create_study_reports_table.php b/database/migrations/2024_12_28_051451_create_study_reports_table.php index 90ee120..0715156 100644 --- a/database/migrations/2024_12_28_051451_create_study_reports_table.php +++ b/database/migrations/2024_12_28_051451_create_study_reports_table.php @@ -21,12 +21,12 @@ public function up(): void $table->foreignIdFor(Institute::class)->index()->nullable()->constrained()->nullOnDelete(); $table->foreignIdFor(Facility::class)->index()->nullable()->constrained()->nullOnDelete(); $table->foreignIdFor(Study::class)->index()->constrained()->cascadeOnDelete(); - $table->foreignIdFor(User::class, 'radiologist_id')->index()->constrained()->cascadeOnDelete(); + $table->foreignIdFor(User::class, 'read_by_id')->index()->constrained()->cascadeOnDelete(); $table->foreignIdFor(User::class, 'dictate_by_id')->index()->nullable()->constrained()->nullOnDelete(); $table->timestamp('dictated_at')->nullable(); - $table->foreignIdFor(User::class, 'approve_by_id')->index()->nullable()->constrained()->nullOnDelete(); + $table->foreignIdFor(User::class, 'approved_by_id')->index()->nullable()->constrained()->nullOnDelete(); $table->timestamp('approved_at')->nullable(); $table->string('report_title')->nullable();