From 3cec2f6e2b03f888fe95922b50ed0721c775f14b Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 4 Apr 2026 15:33:55 +0530 Subject: [PATCH] Added request characteristics in all model files --- app/Models/Item.php | 5 +++++ app/Models/Machine.php | 5 +++++ app/Models/Plant.php | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/app/Models/Item.php b/app/Models/Item.php index 96863fa..c778b39 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -69,6 +69,11 @@ class Item extends Model return $this->hasMany(ClassCharacteristic::class, 'item_id', 'id'); } + public function requestCharacteristics() + { + return $this->hasMany(RequestCharacteristic::class, 'item_id', 'id'); + } + public function weightValidations() { return $this->hasMany(WeightValidation::class); diff --git a/app/Models/Machine.php b/app/Models/Machine.php index a6e4e33..a342563 100644 --- a/app/Models/Machine.php +++ b/app/Models/Machine.php @@ -48,6 +48,11 @@ class Machine extends Model return $this->hasMany(ClassCharacteristic::class, 'machine_id', 'id'); } + public function requestCharacteristics() + { + return $this->hasMany(RequestCharacteristic::class, 'machine_id', 'id'); + } + public function testingPanelReadings() { return $this->hasMany(TestingPanelReading::class); diff --git a/app/Models/Plant.php b/app/Models/Plant.php index 99dcb01..fe20e4a 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -128,6 +128,11 @@ class Plant extends Model // return $this->hasMany(RejectReason::class, 'plant_id', 'id'); // } + public function requestCharacteristics() + { + return $this->hasMany(RequestCharacteristic::class, 'plant_id', 'id'); + } + public function users() { return $this->hasMany(User::class, 'plant_id', 'id');