Merge pull request 'Updated hasMany relationship on Plant model' (#426) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s

Reviewed-on: #426
This commit was merged in pull request #426.
This commit is contained in:
2026-02-28 04:37:18 +00:00

View File

@@ -25,12 +25,12 @@ class Plant extends Model
public function blocks(): HasMany
{
return $this->hasMany(Block::class);
return $this->hasMany(Block::class, 'plant_id', 'id');
}
public function lines(): HasMany
{
return $this->hasMany(Line::class);
return $this->hasMany(Line::class, 'plant_id', 'id');
}
public function getLineNames()
@@ -40,27 +40,27 @@ class Plant extends Model
public function items(): HasMany
{
return $this->hasMany(Item::class);
return $this->hasMany(Item::class, 'plant_id', 'id');
}
public function stickersMasters(): HasMany
{
return $this->hasMany(StickerMaster::class);
return $this->hasMany(StickerMaster::class, 'plant_id', 'id');
}
public function invoiceValidations()
{
return $this->hasMany(InvoiceValidation::class, 'plant_id');
return $this->hasMany(InvoiceValidation::class, 'plant_id', 'id');
}
public function qualityValidations()
{
return $this->hasMany(QualityValidation::class, 'plant_id');
return $this->hasMany(QualityValidation::class, 'plant_id', 'id');
}
public function testingPanelReadings()
{
return $this->hasMany(TestingPanelReading::class);
return $this->hasMany(TestingPanelReading::class, 'plant_id', 'id');
}
public function guardNames()
@@ -95,12 +95,12 @@ class Plant extends Model
public function productCharacteristicsMasters()
{
return $this->hasMany(ProductCharacteristicsMaster::class);
return $this->hasMany(ProductCharacteristicsMaster::class, 'plant_id', 'id');
}
public function characteristicValues()
{
return $this->hasMany(CharacteristicValue::class);
return $this->hasMany(CharacteristicValue::class, 'plant_id', 'id');
}
public function equipmentMasters()