Updated hasMany relationship on Plant model
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Laravel Pint / pint (pull_request) Successful in 2m54s
Laravel Larastan / larastan (pull_request) Failing after 3m45s

This commit is contained in:
dhanabalan
2026-02-28 10:06:46 +05:30
parent b34d48fe92
commit 1e455088f3

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()