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');