From 5279b016d1f49f3c701b9065394a7801965896d3 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Fri, 28 Aug 2026 12:48:51 +0530 Subject: [PATCH] Added pump testing result model files for hasMany relations --- app/Models/Plant.php | 5 +++++ app/Models/PumpTestingMaster.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/app/Models/Plant.php b/app/Models/Plant.php index 7b3d18e..58a6ed0 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -94,6 +94,11 @@ class Plant extends Model return $this->hasMany(PumpTestingEntry::class, 'plant_id', 'id'); } + public function pumpTestingResults() + { + return $this->hasMany(PumpTestingResult::class, 'plant_id', 'id'); + } + public function guardNames() { return $this->hasMany(GuardName::class, 'plant_id', 'id'); diff --git a/app/Models/PumpTestingMaster.php b/app/Models/PumpTestingMaster.php index 271624f..f67f348 100644 --- a/app/Models/PumpTestingMaster.php +++ b/app/Models/PumpTestingMaster.php @@ -59,4 +59,9 @@ class PumpTestingMaster extends Model { return $this->hasMany(PumpTestingEntry::class, 'pump_testing_master_id', 'id'); } + + public function pumpTestingResults() + { + return $this->hasMany(PumpTestingResult::class, 'pump_testing_master_id', 'id'); + } }