From 2e3d3d80521d936054caed73e47aa3f967e614d1 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 14 Sep 2026 12:36:41 +0530 Subject: [PATCH] Added temp stop characteristics model files for hasMany relations --- app/Models/Item.php | 5 +++++ app/Models/Machine.php | 5 +++++ app/Models/Plant.php | 8 ++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/Models/Item.php b/app/Models/Item.php index e792553..bfba54e 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -105,6 +105,11 @@ class Item extends Model return $this->hasMany(TempClassCharacteristic::class, 'item_id', 'id'); } + public function tempStopCharacteristics() + { + return $this->hasMany(TempStopCharacteristic::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 f584c02..349c7e8 100644 --- a/app/Models/Machine.php +++ b/app/Models/Machine.php @@ -88,6 +88,11 @@ class Machine extends Model return $this->hasMany(TempClassCharacteristic::class, 'machine_id', 'id'); } + public function tempStopCharacteristics() + { + return $this->hasMany(TempStopCharacteristic::class, 'machine_id', 'id'); + } + public function equipmentMasters() { return $this->hasMany(EquipmentMaster::class, 'machine_id', 'id'); diff --git a/app/Models/Plant.php b/app/Models/Plant.php index e9ed341..2017230 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -189,10 +189,10 @@ class Plant extends Model return $this->hasMany(TempClassCharacteristic::class, 'plant_id', 'id'); } - // public function tempStopCharacteristics() - // { - // return $this->hasMany(TempStopCharacteristic::class, 'plant_id', 'id'); - // } + public function tempStopCharacteristics() + { + return $this->hasMany(TempStopCharacteristic::class, 'plant_id', 'id'); + } public function users() {