This commit is contained in:
Masroor Ehsan 2025-01-08 20:16:41 +06:00
parent 8c2e39850b
commit 53da38c6f5
2 changed files with 3 additions and 3 deletions

View File

@ -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');
}
/**

View File

@ -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();