diff --git a/app/Models/Plant.php b/app/Models/Plant.php index ee845ff..113dab2 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -49,6 +49,11 @@ class Plant extends Model return $this->hasMany(StickerMaster::class, 'plant_id', 'id'); } + public function locators(): HasMany + { + return $this->hasMany(Locator::class, 'plant_id', 'id'); + } + public function weightValidations(): HasMany { return $this->hasMany(WeightValidation::class, 'plant_id', 'id'); @@ -104,6 +109,11 @@ class Plant extends Model return $this->hasMany(WorkGroupMaster::class, 'plant_id', 'id'); } + public function machines() + { + return $this->hasMany(Machine::class, 'plant_id', 'id'); + } + public function processOrders() { return $this->hasMany(ProcessOrder::class, 'plant_id', 'id'); @@ -178,4 +188,9 @@ class Plant extends Model { return $this->hasMany(AsrsItemValidation::class, 'plant_id', 'id'); } + + // public function locatorValidations() + // { + // return $this->hasMany(LocatorValidation::class, 'plant_id', 'id'); + // } } diff --git a/app/Models/WorkGroupMaster.php b/app/Models/WorkGroupMaster.php index 0ea4032..0ce6b4e 100644 --- a/app/Models/WorkGroupMaster.php +++ b/app/Models/WorkGroupMaster.php @@ -30,6 +30,11 @@ class WorkGroupMaster extends Model return $this->hasMany(ProductCharacteristicsMaster::class); } + public function machines() + { + return $this->hasMany(Machine::class, 'work_group_master_id'); + } + // public function rejectReasons() // { // return $this->hasMany(RejectReason::class, 'work_group_master_id', 'id');