diff --git a/app/Models/Item.php b/app/Models/Item.php index c778b39..5e4dbaf 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -74,6 +74,11 @@ class Item extends Model return $this->hasMany(RequestCharacteristic::class, 'item_id', 'id'); } + public function productionCharacteristics() + { + return $this->hasMany(ProductionCharacteristic::class, 'item_id', 'id'); + } + public function weightValidations() { return $this->hasMany(WeightValidation::class); diff --git a/app/Models/Line.php b/app/Models/Line.php index 9bcb469..a5c1b50 100644 --- a/app/Models/Line.php +++ b/app/Models/Line.php @@ -71,6 +71,11 @@ class Line extends Model return $this->hasMany(CharacteristicValue::class); } + public function productionCharacteristics() + { + return $this->hasMany(ProductionCharacteristic::class); + } + public function workGroup1() { return $this->belongsTo(WorkGroupMaster::class, 'work_group1_id', 'id'); diff --git a/app/Models/Machine.php b/app/Models/Machine.php index a342563..80b564d 100644 --- a/app/Models/Machine.php +++ b/app/Models/Machine.php @@ -53,6 +53,11 @@ class Machine extends Model return $this->hasMany(RequestCharacteristic::class, 'machine_id', 'id'); } + public function productionCharacteristics() + { + return $this->hasMany(ProductionCharacteristic::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 fe20e4a..1ebfa04 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -133,6 +133,11 @@ class Plant extends Model return $this->hasMany(RequestCharacteristic::class, 'plant_id', 'id'); } + public function productionCharacteristics() + { + return $this->hasMany(ProductionCharacteristic::class, 'plant_id', 'id'); + } + public function users() { return $this->hasMany(User::class, 'plant_id', 'id');