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